Modify scripts/postbuild.sh to write a check to start PostgreSQL if it
is not running in buildeg.sh.
Signed-off-by: Jason Stephenson <jason@sigio.com>
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 \\