You've already forked postgres
mirror of
https://github.com/docker-library/postgres.git
synced 2025-07-26 23:21:10 +03:00
Fix "-s" usage
This commit is contained in:
@ -9,7 +9,7 @@ if [ "$1" = 'postgres' ]; then
|
|||||||
chown -R postgres:postgres /run/postgresql
|
chown -R postgres:postgres /run/postgresql
|
||||||
|
|
||||||
# look specifically for PG_VERSION, as it is expected in the DB dir
|
# 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
|
gosu postgres initdb
|
||||||
|
|
||||||
sed -ri "s/^#(listen_addresses\s*=\s*)\S+/\1'*'/" "$PGDATA"/postgresql.conf
|
sed -ri "s/^#(listen_addresses\s*=\s*)\S+/\1'*'/" "$PGDATA"/postgresql.conf
|
||||||
|
@ -9,7 +9,7 @@ if [ "$1" = 'postgres' ]; then
|
|||||||
chown -R postgres:postgres /run/postgresql
|
chown -R postgres:postgres /run/postgresql
|
||||||
|
|
||||||
# look specifically for PG_VERSION, as it is expected in the DB dir
|
# 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
|
gosu postgres initdb
|
||||||
|
|
||||||
sed -ri "s/^#(listen_addresses\s*=\s*)\S+/\1'*'/" "$PGDATA"/postgresql.conf
|
sed -ri "s/^#(listen_addresses\s*=\s*)\S+/\1'*'/" "$PGDATA"/postgresql.conf
|
||||||
|
@ -9,7 +9,7 @@ if [ "$1" = 'postgres' ]; then
|
|||||||
chown -R postgres:postgres /run/postgresql
|
chown -R postgres:postgres /run/postgresql
|
||||||
|
|
||||||
# look specifically for PG_VERSION, as it is expected in the DB dir
|
# 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
|
gosu postgres initdb
|
||||||
|
|
||||||
sed -ri "s/^#(listen_addresses\s*=\s*)\S+/\1'*'/" "$PGDATA"/postgresql.conf
|
sed -ri "s/^#(listen_addresses\s*=\s*)\S+/\1'*'/" "$PGDATA"/postgresql.conf
|
||||||
|
@ -9,7 +9,7 @@ if [ "$1" = 'postgres' ]; then
|
|||||||
chown -R postgres:postgres /run/postgresql
|
chown -R postgres:postgres /run/postgresql
|
||||||
|
|
||||||
# look specifically for PG_VERSION, as it is expected in the DB dir
|
# 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
|
gosu postgres initdb
|
||||||
|
|
||||||
sed -ri "s/^#(listen_addresses\s*=\s*)\S+/\1'*'/" "$PGDATA"/postgresql.conf
|
sed -ri "s/^#(listen_addresses\s*=\s*)\S+/\1'*'/" "$PGDATA"/postgresql.conf
|
||||||
|
@ -9,7 +9,7 @@ if [ "$1" = 'postgres' ]; then
|
|||||||
chown -R postgres:postgres /run/postgresql
|
chown -R postgres:postgres /run/postgresql
|
||||||
|
|
||||||
# look specifically for PG_VERSION, as it is expected in the DB dir
|
# 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
|
gosu postgres initdb
|
||||||
|
|
||||||
sed -ri "s/^#(listen_addresses\s*=\s*)\S+/\1'*'/" "$PGDATA"/postgresql.conf
|
sed -ri "s/^#(listen_addresses\s*=\s*)\S+/\1'*'/" "$PGDATA"/postgresql.conf
|
||||||
|
@ -9,7 +9,7 @@ if [ "$1" = 'postgres' ]; then
|
|||||||
chown -R postgres:postgres /run/postgresql
|
chown -R postgres:postgres /run/postgresql
|
||||||
|
|
||||||
# look specifically for PG_VERSION, as it is expected in the DB dir
|
# 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
|
gosu postgres initdb
|
||||||
|
|
||||||
sed -ri "s/^#(listen_addresses\s*=\s*)\S+/\1'*'/" "$PGDATA"/postgresql.conf
|
sed -ri "s/^#(listen_addresses\s*=\s*)\S+/\1'*'/" "$PGDATA"/postgresql.conf
|
||||||
|
@ -9,7 +9,7 @@ if [ "$1" = 'postgres' ]; then
|
|||||||
chown -R postgres:postgres /run/postgresql
|
chown -R postgres:postgres /run/postgresql
|
||||||
|
|
||||||
# look specifically for PG_VERSION, as it is expected in the DB dir
|
# 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
|
gosu postgres initdb
|
||||||
|
|
||||||
sed -ri "s/^#(listen_addresses\s*=\s*)\S+/\1'*'/" "$PGDATA"/postgresql.conf
|
sed -ri "s/^#(listen_addresses\s*=\s*)\S+/\1'*'/" "$PGDATA"/postgresql.conf
|
||||||
|
Reference in New Issue
Block a user