From: Jason Stephenson Date: Tue, 4 Dec 2018 19:34:09 +0000 (-0500) Subject: Make sure that PostgreSQL starts. X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=a5441bd902bfec230c91e4a9a6dedc9f52a86d6f;p=contrib%2Fmasslnc%2Fvmscripts.git Make sure that PostgreSQL starts. Modify scripts/postbuild.sh to write a check to start PostgreSQL if it is not running in buildeg.sh. Signed-off-by: Jason Stephenson --- diff --git a/scripts/postbuild.sh b/scripts/postbuild.sh index a58f773..3785864 100755 --- a/scripts/postbuild.sh +++ b/scripts/postbuild.sh @@ -164,6 +164,9 @@ ejabberdctl register opensrf public.localhost password EOF_RUNASROOT # We need to do some postgresql work, and build the evergreen DB +if [ -z "\$(pgrep -f postgres)" ]; then + sudo systemctl start postgresql +fi sudo -u postgres psql -c "CREATE ROLE evergreen PASSWORD '$EGVMPGPASS' SUPERUSER CREATEDB CREATEROLE INHERIT LOGIN;" cd /home/opensrf/Evergreen perl Open-ILS/src/support-scripts/eg_db_config --update-config \\