shell/install/pgsql

17 lines
461 B
Plaintext
Raw Permalink Normal View History

#!/bin/bash
##makedesc: Install postgresql (latest) and php-pgsql (if php is installed)
2022-01-08 06:34:20 +00:00
echo
echo "==============================================="
echo "Installing postgresql (latest)..."
2022-01-08 06:34:20 +00:00
echo "==============================================="
echo
2022-01-08 06:34:20 +00:00
installed() {
command -v "$1" >/dev/null 2>&1
}
sudo apt install -y --autoremove postgresql postgresql-contrib
sudo service postgresql restart
installed 'php' && sudo apt install -y --autoremove php-pgsql