Skip to content

Commit 0ced079

Browse files
committed
Fix "-s" usage
1 parent 28b8bd7 commit 0ced079

7 files changed

+7
-7
lines changed

9.0/docker-entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ if [ "$1" = 'postgres' ]; then
99
chown -R postgres:postgres /run/postgresql
1010

1111
# look specifically for PG_VERSION, as it is expected in the DB dir
12-
if [ -s "$PGDATA/PG_VERSION" ]; then
12+
if [ ! -s "$PGDATA/PG_VERSION" ]; then
1313
gosu postgres initdb
1414

1515
sed -ri "s/^#(listen_addresses\s*=\s*)\S+/\1'*'/" "$PGDATA"/postgresql.conf

9.1/docker-entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ if [ "$1" = 'postgres' ]; then
99
chown -R postgres:postgres /run/postgresql
1010

1111
# look specifically for PG_VERSION, as it is expected in the DB dir
12-
if [ -s "$PGDATA/PG_VERSION" ]; then
12+
if [ ! -s "$PGDATA/PG_VERSION" ]; then
1313
gosu postgres initdb
1414

1515
sed -ri "s/^#(listen_addresses\s*=\s*)\S+/\1'*'/" "$PGDATA"/postgresql.conf

9.2/docker-entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ if [ "$1" = 'postgres' ]; then
99
chown -R postgres:postgres /run/postgresql
1010

1111
# look specifically for PG_VERSION, as it is expected in the DB dir
12-
if [ -s "$PGDATA/PG_VERSION" ]; then
12+
if [ ! -s "$PGDATA/PG_VERSION" ]; then
1313
gosu postgres initdb
1414

1515
sed -ri "s/^#(listen_addresses\s*=\s*)\S+/\1'*'/" "$PGDATA"/postgresql.conf

9.3/docker-entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ if [ "$1" = 'postgres' ]; then
99
chown -R postgres:postgres /run/postgresql
1010

1111
# look specifically for PG_VERSION, as it is expected in the DB dir
12-
if [ -s "$PGDATA/PG_VERSION" ]; then
12+
if [ ! -s "$PGDATA/PG_VERSION" ]; then
1313
gosu postgres initdb
1414

1515
sed -ri "s/^#(listen_addresses\s*=\s*)\S+/\1'*'/" "$PGDATA"/postgresql.conf

9.4/docker-entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ if [ "$1" = 'postgres' ]; then
99
chown -R postgres:postgres /run/postgresql
1010

1111
# look specifically for PG_VERSION, as it is expected in the DB dir
12-
if [ -s "$PGDATA/PG_VERSION" ]; then
12+
if [ ! -s "$PGDATA/PG_VERSION" ]; then
1313
gosu postgres initdb
1414

1515
sed -ri "s/^#(listen_addresses\s*=\s*)\S+/\1'*'/" "$PGDATA"/postgresql.conf

9.5/docker-entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ if [ "$1" = 'postgres' ]; then
99
chown -R postgres:postgres /run/postgresql
1010

1111
# look specifically for PG_VERSION, as it is expected in the DB dir
12-
if [ -s "$PGDATA/PG_VERSION" ]; then
12+
if [ ! -s "$PGDATA/PG_VERSION" ]; then
1313
gosu postgres initdb
1414

1515
sed -ri "s/^#(listen_addresses\s*=\s*)\S+/\1'*'/" "$PGDATA"/postgresql.conf

docker-entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ if [ "$1" = 'postgres' ]; then
99
chown -R postgres:postgres /run/postgresql
1010

1111
# look specifically for PG_VERSION, as it is expected in the DB dir
12-
if [ -s "$PGDATA/PG_VERSION" ]; then
12+
if [ ! -s "$PGDATA/PG_VERSION" ]; then
1313
gosu postgres initdb
1414

1515
sed -ri "s/^#(listen_addresses\s*=\s*)\S+/\1'*'/" "$PGDATA"/postgresql.conf

0 commit comments

Comments
 (0)