From 0ced079cd61d4e2b8255e70ab34dff3a87c8499b Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Tue, 21 Jul 2015 16:12:07 -0700 Subject: [PATCH] Fix "-s" usage --- 9.0/docker-entrypoint.sh | 2 +- 9.1/docker-entrypoint.sh | 2 +- 9.2/docker-entrypoint.sh | 2 +- 9.3/docker-entrypoint.sh | 2 +- 9.4/docker-entrypoint.sh | 2 +- 9.5/docker-entrypoint.sh | 2 +- docker-entrypoint.sh | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) 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