1
0
mirror of https://github.com/docker-library/postgres.git synced 2025-07-28 10:42:06 +03:00

Add one more minor tweak on top of #253

This commit is contained in:
Tianon Gravi
2017-01-19 16:04:43 -08:00
parent 00706ec7c2
commit d7accc9c8c
11 changed files with 22 additions and 22 deletions

View File

@ -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"