From a5441bd902bfec230c91e4a9a6dedc9f52a86d6f Mon Sep 17 00:00:00 2001 From: Jason Stephenson Date: Tue, 4 Dec 2018 14:34:09 -0500 Subject: [PATCH] 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 --- scripts/postbuild.sh | 3 +++ 1 file changed, 3 insertions(+) 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 \\ -- 2.11.0