diff --git a/install/810-pgsql.sh b/install/810-pgsql.sh index b917073..766af66 100755 --- a/install/810-pgsql.sh +++ b/install/810-pgsql.sh @@ -1,7 +1,14 @@ #!/bin/bash -. "../src/01-common.sh" || exit 5 -title "Installing pgsql..." +echo +echo "===============================================" +echo "Installing postgresql..." +echo "===============================================" +echo -apti postgresql postgresql-contrib +installed() { + command -v "$1" >/dev/null 2>&1 +} + +sudo apt install -y --autoremove postgresql postgresql-contrib sudo service postgresql restart -installed php && apti php-pgsql +installed php && sudo apt install -y --autoremove php-pgsql