From bf970f58cd464ecf7394e03b593df729b94e8364 Mon Sep 17 00:00:00 2001 From: AnthonyAxenov Date: Wed, 31 Jul 2024 23:32:46 +0800 Subject: [PATCH] pgsql rework --- install/pgsql | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/install/pgsql b/install/pgsql index 5386919..81de742 100755 --- a/install/pgsql +++ b/install/pgsql @@ -1,16 +1,14 @@ #!/bin/bash ##makedesc: Install postgresql (latest) and php-pgsql (if php is installed) +source `dirname $0`/../helpers || exit 255 -echo -echo "===============================================" -echo "Installing postgresql (latest)..." -echo "===============================================" -echo +title -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 +require postgresql postgresql-contrib && \ + sudo service postgresql restart && \ + { + echo + success "openvpn installed!" + postgres --version + echo + }