pgsql rework

This commit is contained in:
Anthony Axenov 2024-07-31 23:32:46 +08:00
parent 7159850e83
commit bf970f58cd
Signed by: anthony
GPG Key ID: EA9EC32FF7CCD4EC

View File

@ -1,16 +1,14 @@
#!/bin/bash #!/bin/bash
##makedesc: Install postgresql (latest) and php-pgsql (if php is installed) ##makedesc: Install postgresql (latest) and php-pgsql (if php is installed)
source `dirname $0`/../helpers || exit 255
echo title
echo "==============================================="
echo "Installing postgresql (latest)..."
echo "==============================================="
echo
installed() { require postgresql postgresql-contrib && \
command -v "$1" >/dev/null 2>&1 sudo service postgresql restart && \
} {
echo
sudo apt install -y --autoremove postgresql postgresql-contrib success "openvpn installed!"
sudo service postgresql restart postgres --version
installed 'php' && sudo apt install -y --autoremove php-pgsql echo
}