From d7accc9c8c7d740ad756b887225fe31286d98f64 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Thu, 19 Jan 2017 16:04:43 -0800 Subject: [PATCH] Add one more minor tweak on top of #253 --- 9.2/alpine/docker-entrypoint.sh | 4 ++-- 9.2/docker-entrypoint.sh | 4 ++-- 9.3/alpine/docker-entrypoint.sh | 4 ++-- 9.3/docker-entrypoint.sh | 4 ++-- 9.4/alpine/docker-entrypoint.sh | 4 ++-- 9.4/docker-entrypoint.sh | 4 ++-- 9.5/alpine/docker-entrypoint.sh | 4 ++-- 9.5/docker-entrypoint.sh | 4 ++-- 9.6/alpine/docker-entrypoint.sh | 4 ++-- 9.6/docker-entrypoint.sh | 4 ++-- docker-entrypoint.sh | 4 ++-- 11 files changed, 22 insertions(+), 22 deletions(-) diff --git a/9.2/alpine/docker-entrypoint.sh b/9.2/alpine/docker-entrypoint.sh index 3ef8a645e1..0ec0bdd54e 100755 --- a/9.2/alpine/docker-entrypoint.sh +++ b/9.2/alpine/docker-entrypoint.sh @@ -42,11 +42,11 @@ fi if [ "$1" = 'postgres' ]; then mkdir -p "$PGDATA" + chown -R "$(id -u)" "$PGDATA" 2>/dev/null || : + chmod 700 "$PGDATA" 2>/dev/null || : # look specifically for PG_VERSION, as it is expected in the DB dir if [ ! -s "$PGDATA/PG_VERSION" ]; then - chown -R "$(id -u)" "$PGDATA" 2>/dev/null || : - file_env 'POSTGRES_INITDB_ARGS' eval "initdb --username=postgres $POSTGRES_INITDB_ARGS" diff --git a/9.2/docker-entrypoint.sh b/9.2/docker-entrypoint.sh index d74eb4e66c..66ea0f1d94 100755 --- a/9.2/docker-entrypoint.sh +++ b/9.2/docker-entrypoint.sh @@ -42,11 +42,11 @@ fi if [ "$1" = 'postgres' ]; then mkdir -p "$PGDATA" + chown -R "$(id -u)" "$PGDATA" 2>/dev/null || : + chmod 700 "$PGDATA" 2>/dev/null || : # look specifically for PG_VERSION, as it is expected in the DB dir if [ ! -s "$PGDATA/PG_VERSION" ]; then - chown -R "$(id -u)" "$PGDATA" 2>/dev/null || : - file_env 'POSTGRES_INITDB_ARGS' eval "initdb --username=postgres $POSTGRES_INITDB_ARGS" diff --git a/9.3/alpine/docker-entrypoint.sh b/9.3/alpine/docker-entrypoint.sh index 3ef8a645e1..0ec0bdd54e 100755 --- a/9.3/alpine/docker-entrypoint.sh +++ b/9.3/alpine/docker-entrypoint.sh @@ -42,11 +42,11 @@ fi if [ "$1" = 'postgres' ]; then mkdir -p "$PGDATA" + chown -R "$(id -u)" "$PGDATA" 2>/dev/null || : + chmod 700 "$PGDATA" 2>/dev/null || : # look specifically for PG_VERSION, as it is expected in the DB dir if [ ! -s "$PGDATA/PG_VERSION" ]; then - chown -R "$(id -u)" "$PGDATA" 2>/dev/null || : - file_env 'POSTGRES_INITDB_ARGS' eval "initdb --username=postgres $POSTGRES_INITDB_ARGS" diff --git a/9.3/docker-entrypoint.sh b/9.3/docker-entrypoint.sh index d74eb4e66c..66ea0f1d94 100755 --- a/9.3/docker-entrypoint.sh +++ b/9.3/docker-entrypoint.sh @@ -42,11 +42,11 @@ fi if [ "$1" = 'postgres' ]; then mkdir -p "$PGDATA" + chown -R "$(id -u)" "$PGDATA" 2>/dev/null || : + chmod 700 "$PGDATA" 2>/dev/null || : # look specifically for PG_VERSION, as it is expected in the DB dir if [ ! -s "$PGDATA/PG_VERSION" ]; then - chown -R "$(id -u)" "$PGDATA" 2>/dev/null || : - file_env 'POSTGRES_INITDB_ARGS' eval "initdb --username=postgres $POSTGRES_INITDB_ARGS" diff --git a/9.4/alpine/docker-entrypoint.sh b/9.4/alpine/docker-entrypoint.sh index 3ef8a645e1..0ec0bdd54e 100755 --- a/9.4/alpine/docker-entrypoint.sh +++ b/9.4/alpine/docker-entrypoint.sh @@ -42,11 +42,11 @@ fi if [ "$1" = 'postgres' ]; then mkdir -p "$PGDATA" + chown -R "$(id -u)" "$PGDATA" 2>/dev/null || : + chmod 700 "$PGDATA" 2>/dev/null || : # look specifically for PG_VERSION, as it is expected in the DB dir if [ ! -s "$PGDATA/PG_VERSION" ]; then - chown -R "$(id -u)" "$PGDATA" 2>/dev/null || : - file_env 'POSTGRES_INITDB_ARGS' eval "initdb --username=postgres $POSTGRES_INITDB_ARGS" diff --git a/9.4/docker-entrypoint.sh b/9.4/docker-entrypoint.sh index d74eb4e66c..66ea0f1d94 100755 --- a/9.4/docker-entrypoint.sh +++ b/9.4/docker-entrypoint.sh @@ -42,11 +42,11 @@ fi if [ "$1" = 'postgres' ]; then mkdir -p "$PGDATA" + chown -R "$(id -u)" "$PGDATA" 2>/dev/null || : + chmod 700 "$PGDATA" 2>/dev/null || : # look specifically for PG_VERSION, as it is expected in the DB dir if [ ! -s "$PGDATA/PG_VERSION" ]; then - chown -R "$(id -u)" "$PGDATA" 2>/dev/null || : - file_env 'POSTGRES_INITDB_ARGS' eval "initdb --username=postgres $POSTGRES_INITDB_ARGS" diff --git a/9.5/alpine/docker-entrypoint.sh b/9.5/alpine/docker-entrypoint.sh index 3ef8a645e1..0ec0bdd54e 100755 --- a/9.5/alpine/docker-entrypoint.sh +++ b/9.5/alpine/docker-entrypoint.sh @@ -42,11 +42,11 @@ fi if [ "$1" = 'postgres' ]; then mkdir -p "$PGDATA" + chown -R "$(id -u)" "$PGDATA" 2>/dev/null || : + chmod 700 "$PGDATA" 2>/dev/null || : # look specifically for PG_VERSION, as it is expected in the DB dir if [ ! -s "$PGDATA/PG_VERSION" ]; then - chown -R "$(id -u)" "$PGDATA" 2>/dev/null || : - file_env 'POSTGRES_INITDB_ARGS' eval "initdb --username=postgres $POSTGRES_INITDB_ARGS" diff --git a/9.5/docker-entrypoint.sh b/9.5/docker-entrypoint.sh index d74eb4e66c..66ea0f1d94 100755 --- a/9.5/docker-entrypoint.sh +++ b/9.5/docker-entrypoint.sh @@ -42,11 +42,11 @@ fi if [ "$1" = 'postgres' ]; then mkdir -p "$PGDATA" + chown -R "$(id -u)" "$PGDATA" 2>/dev/null || : + chmod 700 "$PGDATA" 2>/dev/null || : # look specifically for PG_VERSION, as it is expected in the DB dir if [ ! -s "$PGDATA/PG_VERSION" ]; then - chown -R "$(id -u)" "$PGDATA" 2>/dev/null || : - file_env 'POSTGRES_INITDB_ARGS' eval "initdb --username=postgres $POSTGRES_INITDB_ARGS" diff --git a/9.6/alpine/docker-entrypoint.sh b/9.6/alpine/docker-entrypoint.sh index 3ef8a645e1..0ec0bdd54e 100755 --- a/9.6/alpine/docker-entrypoint.sh +++ b/9.6/alpine/docker-entrypoint.sh @@ -42,11 +42,11 @@ fi if [ "$1" = 'postgres' ]; then mkdir -p "$PGDATA" + chown -R "$(id -u)" "$PGDATA" 2>/dev/null || : + chmod 700 "$PGDATA" 2>/dev/null || : # look specifically for PG_VERSION, as it is expected in the DB dir if [ ! -s "$PGDATA/PG_VERSION" ]; then - chown -R "$(id -u)" "$PGDATA" 2>/dev/null || : - file_env 'POSTGRES_INITDB_ARGS' eval "initdb --username=postgres $POSTGRES_INITDB_ARGS" diff --git a/9.6/docker-entrypoint.sh b/9.6/docker-entrypoint.sh index d74eb4e66c..66ea0f1d94 100755 --- a/9.6/docker-entrypoint.sh +++ b/9.6/docker-entrypoint.sh @@ -42,11 +42,11 @@ fi if [ "$1" = 'postgres' ]; then mkdir -p "$PGDATA" + chown -R "$(id -u)" "$PGDATA" 2>/dev/null || : + chmod 700 "$PGDATA" 2>/dev/null || : # look specifically for PG_VERSION, as it is expected in the DB dir if [ ! -s "$PGDATA/PG_VERSION" ]; then - chown -R "$(id -u)" "$PGDATA" 2>/dev/null || : - file_env 'POSTGRES_INITDB_ARGS' eval "initdb --username=postgres $POSTGRES_INITDB_ARGS" diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index d74eb4e66c..66ea0f1d94 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -42,11 +42,11 @@ fi if [ "$1" = 'postgres' ]; then mkdir -p "$PGDATA" + chown -R "$(id -u)" "$PGDATA" 2>/dev/null || : + chmod 700 "$PGDATA" 2>/dev/null || : # look specifically for PG_VERSION, as it is expected in the DB dir if [ ! -s "$PGDATA/PG_VERSION" ]; then - chown -R "$(id -u)" "$PGDATA" 2>/dev/null || : - file_env 'POSTGRES_INITDB_ARGS' eval "initdb --username=postgres $POSTGRES_INITDB_ARGS"