Merge improvements from 9.5 branch (#60)

* Allow changing the default database name (#50)

* Commented out legacy scripts since it seems they are removed in 2.2

* 9.5 2.2 (#59)

* Allow changing the default database name (#50)

* Commented out legacy scripts since it seems they are removed in 2.2

* Improve start (#57)

* Make initial dir optional

* Improve termination of background initial process #56
pull/51/head^2
Tim Sutton 2017-03-27 06:41:30 +02:00 zatwierdzone przez GitHub
rodzic a920ae0a07
commit f331fc6add
1 zmienionych plików z 8 dodań i 2 usunięć

Wyświetl plik

@ -18,7 +18,7 @@ rm -r /etc/ssl
mv /tmp/ssl-copy /etc/ssl
# Needed under debian, wasnt needed under ubuntu
mkdir /var/run/postgresql/9.5-main.pg_stat_tmp
mkdir -p /var/run/postgresql/9.5-main.pg_stat_tmp
chmod 0777 /var/run/postgresql/9.5-main.pg_stat_tmp
# test if DATADIR is existent
@ -140,7 +140,13 @@ fi
su - postgres -c "psql -l"
PID=`cat /var/run/postgresql/9.5-main.pid`
kill -9 ${PID}
kill -TERM ${PID}
# Wait for background postgres main process to exit
while [ "$(ls -A /var/run/postgresql/9.5-main.pid 2>/dev/null)" ]; do
sleep 1
done
echo "Postgres initialisation process completed .... restarting in foreground"
SETVARS="POSTGIS_ENABLE_OUTDB_RASTERS=1 POSTGIS_GDAL_ENABLED_DRIVERS=ENABLE_ALL"
su - postgres -c "$SETVARS $POSTGRES -D $DATADIR -c config_file=$CONF"