Skip to content

Commit 3d4e5e9

Browse files
pahaztianon
authored andcommitted
Simplify docker-entrypoint.sh append line
1 parent 123aedc commit 3d4e5e9

11 files changed

+44
-11
lines changed

9.2/alpine/docker-entrypoint.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,10 @@ if [ "$1" = 'postgres' ]; then
8686
authMethod=trust
8787
fi
8888

89-
{ echo; echo "host all all all $authMethod"; } | tee -a "$PGDATA/pg_hba.conf" > /dev/null
89+
{
90+
echo
91+
echo "host all all all $authMethod"
92+
} >> "$PGDATA/pg_hba.conf"
9093

9194
# internal start of server in order to allow set-up using psql-client
9295
# does not listen on external TCP/IP and waits until start finishes

9.2/docker-entrypoint.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,10 @@ if [ "$1" = 'postgres' ]; then
8686
authMethod=trust
8787
fi
8888

89-
{ echo; echo "host all all all $authMethod"; } | tee -a "$PGDATA/pg_hba.conf" > /dev/null
89+
{
90+
echo
91+
echo "host all all all $authMethod"
92+
} >> "$PGDATA/pg_hba.conf"
9093

9194
# internal start of server in order to allow set-up using psql-client
9295
# does not listen on external TCP/IP and waits until start finishes

9.3/alpine/docker-entrypoint.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,10 @@ if [ "$1" = 'postgres' ]; then
8686
authMethod=trust
8787
fi
8888

89-
{ echo; echo "host all all all $authMethod"; } | tee -a "$PGDATA/pg_hba.conf" > /dev/null
89+
{
90+
echo
91+
echo "host all all all $authMethod"
92+
} >> "$PGDATA/pg_hba.conf"
9093

9194
# internal start of server in order to allow set-up using psql-client
9295
# does not listen on external TCP/IP and waits until start finishes

9.3/docker-entrypoint.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,10 @@ if [ "$1" = 'postgres' ]; then
8686
authMethod=trust
8787
fi
8888

89-
{ echo; echo "host all all all $authMethod"; } | tee -a "$PGDATA/pg_hba.conf" > /dev/null
89+
{
90+
echo
91+
echo "host all all all $authMethod"
92+
} >> "$PGDATA/pg_hba.conf"
9093

9194
# internal start of server in order to allow set-up using psql-client
9295
# does not listen on external TCP/IP and waits until start finishes

9.4/alpine/docker-entrypoint.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,10 @@ if [ "$1" = 'postgres' ]; then
8686
authMethod=trust
8787
fi
8888

89-
{ echo; echo "host all all all $authMethod"; } | tee -a "$PGDATA/pg_hba.conf" > /dev/null
89+
{
90+
echo
91+
echo "host all all all $authMethod"
92+
} >> "$PGDATA/pg_hba.conf"
9093

9194
# internal start of server in order to allow set-up using psql-client
9295
# does not listen on external TCP/IP and waits until start finishes

9.4/docker-entrypoint.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,10 @@ if [ "$1" = 'postgres' ]; then
8686
authMethod=trust
8787
fi
8888

89-
{ echo; echo "host all all all $authMethod"; } | tee -a "$PGDATA/pg_hba.conf" > /dev/null
89+
{
90+
echo
91+
echo "host all all all $authMethod"
92+
} >> "$PGDATA/pg_hba.conf"
9093

9194
# internal start of server in order to allow set-up using psql-client
9295
# does not listen on external TCP/IP and waits until start finishes

9.5/alpine/docker-entrypoint.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,10 @@ if [ "$1" = 'postgres' ]; then
8686
authMethod=trust
8787
fi
8888

89-
{ echo; echo "host all all all $authMethod"; } | tee -a "$PGDATA/pg_hba.conf" > /dev/null
89+
{
90+
echo
91+
echo "host all all all $authMethod"
92+
} >> "$PGDATA/pg_hba.conf"
9093

9194
# internal start of server in order to allow set-up using psql-client
9295
# does not listen on external TCP/IP and waits until start finishes

9.5/docker-entrypoint.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,10 @@ if [ "$1" = 'postgres' ]; then
8686
authMethod=trust
8787
fi
8888

89-
{ echo; echo "host all all all $authMethod"; } | tee -a "$PGDATA/pg_hba.conf" > /dev/null
89+
{
90+
echo
91+
echo "host all all all $authMethod"
92+
} >> "$PGDATA/pg_hba.conf"
9093

9194
# internal start of server in order to allow set-up using psql-client
9295
# does not listen on external TCP/IP and waits until start finishes

9.6/alpine/docker-entrypoint.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,10 @@ if [ "$1" = 'postgres' ]; then
8686
authMethod=trust
8787
fi
8888

89-
{ echo; echo "host all all all $authMethod"; } | tee -a "$PGDATA/pg_hba.conf" > /dev/null
89+
{
90+
echo
91+
echo "host all all all $authMethod"
92+
} >> "$PGDATA/pg_hba.conf"
9093

9194
# internal start of server in order to allow set-up using psql-client
9295
# does not listen on external TCP/IP and waits until start finishes

9.6/docker-entrypoint.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,10 @@ if [ "$1" = 'postgres' ]; then
8686
authMethod=trust
8787
fi
8888

89-
{ echo; echo "host all all all $authMethod"; } | tee -a "$PGDATA/pg_hba.conf" > /dev/null
89+
{
90+
echo
91+
echo "host all all all $authMethod"
92+
} >> "$PGDATA/pg_hba.conf"
9093

9194
# internal start of server in order to allow set-up using psql-client
9295
# does not listen on external TCP/IP and waits until start finishes

docker-entrypoint.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,10 @@ if [ "$1" = 'postgres' ]; then
8686
authMethod=trust
8787
fi
8888

89-
{ echo; echo "host all all all $authMethod"; } | tee -a "$PGDATA/pg_hba.conf" > /dev/null
89+
{
90+
echo
91+
echo "host all all all $authMethod"
92+
} >> "$PGDATA/pg_hba.conf"
9093

9194
# internal start of server in order to allow set-up using psql-client
9295
# does not listen on external TCP/IP and waits until start finishes

0 commit comments

Comments
 (0)