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