1
0
mirror of https://github.com/docker-library/postgres.git synced 2025-07-28 10:42:06 +03:00

Check that PG_VERSION is non-empty.

This commit is contained in:
Victor Heng
2015-07-19 00:41:18 +08:00
parent 3231f4a4d8
commit 9c7bb73021
7 changed files with 7 additions and 7 deletions

View File

@ -9,7 +9,7 @@ if [ "$1" = 'postgres' ]; then
chown -R postgres:postgres /run/postgresql
# look specifically for PG_VERSION, as it is expected in the DB dir
if [ -z "$(ls -A "$PGDATA"/PG_VERSION)" ]; then
if [ -s "$PGDATA/PG_VERSION" ]; then
gosu postgres initdb
sed -ri "s/^#(listen_addresses\s*=\s*)\S+/\1'*'/" "$PGDATA"/postgresql.conf