diff --git a/9.0/docker-entrypoint.sh b/9.0/docker-entrypoint.sh index 5691f092cb..ba6aab2a8e 100755 --- a/9.0/docker-entrypoint.sh +++ b/9.0/docker-entrypoint.sh @@ -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 [ -s "$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 diff --git a/9.1/docker-entrypoint.sh b/9.1/docker-entrypoint.sh index 5691f092cb..ba6aab2a8e 100755 --- a/9.1/docker-entrypoint.sh +++ b/9.1/docker-entrypoint.sh @@ -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 [ -s "$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 diff --git a/9.2/docker-entrypoint.sh b/9.2/docker-entrypoint.sh index 5691f092cb..ba6aab2a8e 100755 --- a/9.2/docker-entrypoint.sh +++ b/9.2/docker-entrypoint.sh @@ -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 [ -s "$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 diff --git a/9.3/docker-entrypoint.sh b/9.3/docker-entrypoint.sh index 5691f092cb..ba6aab2a8e 100755 --- a/9.3/docker-entrypoint.sh +++ b/9.3/docker-entrypoint.sh @@ -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 [ -s "$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 diff --git a/9.4/docker-entrypoint.sh b/9.4/docker-entrypoint.sh index 5691f092cb..ba6aab2a8e 100755 --- a/9.4/docker-entrypoint.sh +++ b/9.4/docker-entrypoint.sh @@ -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 [ -s "$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 diff --git a/9.5/docker-entrypoint.sh b/9.5/docker-entrypoint.sh index 5691f092cb..ba6aab2a8e 100755 --- a/9.5/docker-entrypoint.sh +++ b/9.5/docker-entrypoint.sh @@ -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 [ -s "$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 diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 5691f092cb..ba6aab2a8e 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -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 [ -s "$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