File tree 11 files changed +44
-33
lines changed 11 files changed +44
-33
lines changed Original file line number Diff line number Diff line change @@ -38,12 +38,10 @@ if [ "$1" = 'postgres' ] && [ "$(id -u)" = '0' ]; then
38
38
chmod g+s /var/run/postgresql
39
39
40
40
# Create the transaction log directory before initdb is run (below) so the directory is owned by the correct user
41
- file_env ' POSTGRES_INITDB_XLOGDIR'
42
41
if [ " $POSTGRES_INITDB_XLOGDIR " ]; then
43
42
mkdir -p " $POSTGRES_INITDB_XLOGDIR "
44
- chmod 700 " $POSTGRES_INITDB_XLOGDIR "
45
43
chown -R postgres " $POSTGRES_INITDB_XLOGDIR "
46
- export POSTGRES_INITDB_ARGS= " $POSTGRES_INITDB_ARGS --xlogdir $POSTGRES_INITDB_XLOGDIR "
44
+ chmod 700 " $POSTGRES_INITDB_XLOGDIR "
47
45
fi
48
46
49
47
exec su-exec postgres " $BASH_SOURCE " " $@ "
@@ -57,6 +55,9 @@ if [ "$1" = 'postgres' ]; then
57
55
# look specifically for PG_VERSION, as it is expected in the DB dir
58
56
if [ ! -s " $PGDATA /PG_VERSION" ]; then
59
57
file_env ' POSTGRES_INITDB_ARGS'
58
+ if [ " $POSTGRES_INITDB_XLOGDIR " ]; then
59
+ export POSTGRES_INITDB_ARGS=" $POSTGRES_INITDB_ARGS --xlogdir $POSTGRES_INITDB_XLOGDIR "
60
+ fi
60
61
eval " initdb --username=postgres $POSTGRES_INITDB_ARGS "
61
62
62
63
# check password first so we can output the warning before postgres
Original file line number Diff line number Diff line change @@ -38,12 +38,10 @@ if [ "$1" = 'postgres' ] && [ "$(id -u)" = '0' ]; then
38
38
chmod g+s /var/run/postgresql
39
39
40
40
# Create the transaction log directory before initdb is run (below) so the directory is owned by the correct user
41
- file_env ' POSTGRES_INITDB_XLOGDIR'
42
41
if [ " $POSTGRES_INITDB_XLOGDIR " ]; then
43
42
mkdir -p " $POSTGRES_INITDB_XLOGDIR "
44
- chmod 700 " $POSTGRES_INITDB_XLOGDIR "
45
43
chown -R postgres " $POSTGRES_INITDB_XLOGDIR "
46
- export POSTGRES_INITDB_ARGS= " $POSTGRES_INITDB_ARGS --xlogdir $POSTGRES_INITDB_XLOGDIR "
44
+ chmod 700 " $POSTGRES_INITDB_XLOGDIR "
47
45
fi
48
46
49
47
exec gosu postgres " $BASH_SOURCE " " $@ "
@@ -57,6 +55,9 @@ if [ "$1" = 'postgres' ]; then
57
55
# look specifically for PG_VERSION, as it is expected in the DB dir
58
56
if [ ! -s " $PGDATA /PG_VERSION" ]; then
59
57
file_env ' POSTGRES_INITDB_ARGS'
58
+ if [ " $POSTGRES_INITDB_XLOGDIR " ]; then
59
+ export POSTGRES_INITDB_ARGS=" $POSTGRES_INITDB_ARGS --xlogdir $POSTGRES_INITDB_XLOGDIR "
60
+ fi
60
61
eval " initdb --username=postgres $POSTGRES_INITDB_ARGS "
61
62
62
63
# check password first so we can output the warning before postgres
Original file line number Diff line number Diff line change @@ -38,12 +38,10 @@ if [ "$1" = 'postgres' ] && [ "$(id -u)" = '0' ]; then
38
38
chmod g+s /var/run/postgresql
39
39
40
40
# Create the transaction log directory before initdb is run (below) so the directory is owned by the correct user
41
- file_env ' POSTGRES_INITDB_XLOGDIR'
42
41
if [ " $POSTGRES_INITDB_XLOGDIR " ]; then
43
42
mkdir -p " $POSTGRES_INITDB_XLOGDIR "
44
- chmod 700 " $POSTGRES_INITDB_XLOGDIR "
45
43
chown -R postgres " $POSTGRES_INITDB_XLOGDIR "
46
- export POSTGRES_INITDB_ARGS= " $POSTGRES_INITDB_ARGS --xlogdir $POSTGRES_INITDB_XLOGDIR "
44
+ chmod 700 " $POSTGRES_INITDB_XLOGDIR "
47
45
fi
48
46
49
47
exec su-exec postgres " $BASH_SOURCE " " $@ "
@@ -57,6 +55,9 @@ if [ "$1" = 'postgres' ]; then
57
55
# look specifically for PG_VERSION, as it is expected in the DB dir
58
56
if [ ! -s " $PGDATA /PG_VERSION" ]; then
59
57
file_env ' POSTGRES_INITDB_ARGS'
58
+ if [ " $POSTGRES_INITDB_XLOGDIR " ]; then
59
+ export POSTGRES_INITDB_ARGS=" $POSTGRES_INITDB_ARGS --xlogdir $POSTGRES_INITDB_XLOGDIR "
60
+ fi
60
61
eval " initdb --username=postgres $POSTGRES_INITDB_ARGS "
61
62
62
63
# check password first so we can output the warning before postgres
Original file line number Diff line number Diff line change @@ -38,12 +38,10 @@ if [ "$1" = 'postgres' ] && [ "$(id -u)" = '0' ]; then
38
38
chmod g+s /var/run/postgresql
39
39
40
40
# Create the transaction log directory before initdb is run (below) so the directory is owned by the correct user
41
- file_env ' POSTGRES_INITDB_XLOGDIR'
42
41
if [ " $POSTGRES_INITDB_XLOGDIR " ]; then
43
42
mkdir -p " $POSTGRES_INITDB_XLOGDIR "
44
- chmod 700 " $POSTGRES_INITDB_XLOGDIR "
45
43
chown -R postgres " $POSTGRES_INITDB_XLOGDIR "
46
- export POSTGRES_INITDB_ARGS= " $POSTGRES_INITDB_ARGS --xlogdir $POSTGRES_INITDB_XLOGDIR "
44
+ chmod 700 " $POSTGRES_INITDB_XLOGDIR "
47
45
fi
48
46
49
47
exec gosu postgres " $BASH_SOURCE " " $@ "
@@ -57,6 +55,9 @@ if [ "$1" = 'postgres' ]; then
57
55
# look specifically for PG_VERSION, as it is expected in the DB dir
58
56
if [ ! -s " $PGDATA /PG_VERSION" ]; then
59
57
file_env ' POSTGRES_INITDB_ARGS'
58
+ if [ " $POSTGRES_INITDB_XLOGDIR " ]; then
59
+ export POSTGRES_INITDB_ARGS=" $POSTGRES_INITDB_ARGS --xlogdir $POSTGRES_INITDB_XLOGDIR "
60
+ fi
60
61
eval " initdb --username=postgres $POSTGRES_INITDB_ARGS "
61
62
62
63
# check password first so we can output the warning before postgres
Original file line number Diff line number Diff line change @@ -38,12 +38,10 @@ if [ "$1" = 'postgres' ] && [ "$(id -u)" = '0' ]; then
38
38
chmod g+s /var/run/postgresql
39
39
40
40
# Create the transaction log directory before initdb is run (below) so the directory is owned by the correct user
41
- file_env ' POSTGRES_INITDB_XLOGDIR'
42
41
if [ " $POSTGRES_INITDB_XLOGDIR " ]; then
43
42
mkdir -p " $POSTGRES_INITDB_XLOGDIR "
44
- chmod 700 " $POSTGRES_INITDB_XLOGDIR "
45
43
chown -R postgres " $POSTGRES_INITDB_XLOGDIR "
46
- export POSTGRES_INITDB_ARGS= " $POSTGRES_INITDB_ARGS --xlogdir $POSTGRES_INITDB_XLOGDIR "
44
+ chmod 700 " $POSTGRES_INITDB_XLOGDIR "
47
45
fi
48
46
49
47
exec su-exec postgres " $BASH_SOURCE " " $@ "
@@ -57,6 +55,9 @@ if [ "$1" = 'postgres' ]; then
57
55
# look specifically for PG_VERSION, as it is expected in the DB dir
58
56
if [ ! -s " $PGDATA /PG_VERSION" ]; then
59
57
file_env ' POSTGRES_INITDB_ARGS'
58
+ if [ " $POSTGRES_INITDB_XLOGDIR " ]; then
59
+ export POSTGRES_INITDB_ARGS=" $POSTGRES_INITDB_ARGS --xlogdir $POSTGRES_INITDB_XLOGDIR "
60
+ fi
60
61
eval " initdb --username=postgres $POSTGRES_INITDB_ARGS "
61
62
62
63
# check password first so we can output the warning before postgres
Original file line number Diff line number Diff line change @@ -38,12 +38,10 @@ if [ "$1" = 'postgres' ] && [ "$(id -u)" = '0' ]; then
38
38
chmod g+s /var/run/postgresql
39
39
40
40
# Create the transaction log directory before initdb is run (below) so the directory is owned by the correct user
41
- file_env ' POSTGRES_INITDB_XLOGDIR'
42
41
if [ " $POSTGRES_INITDB_XLOGDIR " ]; then
43
42
mkdir -p " $POSTGRES_INITDB_XLOGDIR "
44
- chmod 700 " $POSTGRES_INITDB_XLOGDIR "
45
43
chown -R postgres " $POSTGRES_INITDB_XLOGDIR "
46
- export POSTGRES_INITDB_ARGS= " $POSTGRES_INITDB_ARGS --xlogdir $POSTGRES_INITDB_XLOGDIR "
44
+ chmod 700 " $POSTGRES_INITDB_XLOGDIR "
47
45
fi
48
46
49
47
exec gosu postgres " $BASH_SOURCE " " $@ "
@@ -57,6 +55,9 @@ if [ "$1" = 'postgres' ]; then
57
55
# look specifically for PG_VERSION, as it is expected in the DB dir
58
56
if [ ! -s " $PGDATA /PG_VERSION" ]; then
59
57
file_env ' POSTGRES_INITDB_ARGS'
58
+ if [ " $POSTGRES_INITDB_XLOGDIR " ]; then
59
+ export POSTGRES_INITDB_ARGS=" $POSTGRES_INITDB_ARGS --xlogdir $POSTGRES_INITDB_XLOGDIR "
60
+ fi
60
61
eval " initdb --username=postgres $POSTGRES_INITDB_ARGS "
61
62
62
63
# check password first so we can output the warning before postgres
Original file line number Diff line number Diff line change @@ -38,12 +38,10 @@ if [ "$1" = 'postgres' ] && [ "$(id -u)" = '0' ]; then
38
38
chmod g+s /var/run/postgresql
39
39
40
40
# Create the transaction log directory before initdb is run (below) so the directory is owned by the correct user
41
- file_env ' POSTGRES_INITDB_XLOGDIR'
42
41
if [ " $POSTGRES_INITDB_XLOGDIR " ]; then
43
42
mkdir -p " $POSTGRES_INITDB_XLOGDIR "
44
- chmod 700 " $POSTGRES_INITDB_XLOGDIR "
45
43
chown -R postgres " $POSTGRES_INITDB_XLOGDIR "
46
- export POSTGRES_INITDB_ARGS= " $POSTGRES_INITDB_ARGS --xlogdir $POSTGRES_INITDB_XLOGDIR "
44
+ chmod 700 " $POSTGRES_INITDB_XLOGDIR "
47
45
fi
48
46
49
47
exec su-exec postgres " $BASH_SOURCE " " $@ "
@@ -57,6 +55,9 @@ if [ "$1" = 'postgres' ]; then
57
55
# look specifically for PG_VERSION, as it is expected in the DB dir
58
56
if [ ! -s " $PGDATA /PG_VERSION" ]; then
59
57
file_env ' POSTGRES_INITDB_ARGS'
58
+ if [ " $POSTGRES_INITDB_XLOGDIR " ]; then
59
+ export POSTGRES_INITDB_ARGS=" $POSTGRES_INITDB_ARGS --xlogdir $POSTGRES_INITDB_XLOGDIR "
60
+ fi
60
61
eval " initdb --username=postgres $POSTGRES_INITDB_ARGS "
61
62
62
63
# check password first so we can output the warning before postgres
Original file line number Diff line number Diff line change @@ -38,12 +38,10 @@ if [ "$1" = 'postgres' ] && [ "$(id -u)" = '0' ]; then
38
38
chmod g+s /var/run/postgresql
39
39
40
40
# Create the transaction log directory before initdb is run (below) so the directory is owned by the correct user
41
- file_env ' POSTGRES_INITDB_XLOGDIR'
42
41
if [ " $POSTGRES_INITDB_XLOGDIR " ]; then
43
42
mkdir -p " $POSTGRES_INITDB_XLOGDIR "
44
- chmod 700 " $POSTGRES_INITDB_XLOGDIR "
45
43
chown -R postgres " $POSTGRES_INITDB_XLOGDIR "
46
- export POSTGRES_INITDB_ARGS= " $POSTGRES_INITDB_ARGS --xlogdir $POSTGRES_INITDB_XLOGDIR "
44
+ chmod 700 " $POSTGRES_INITDB_XLOGDIR "
47
45
fi
48
46
49
47
exec gosu postgres " $BASH_SOURCE " " $@ "
@@ -57,6 +55,9 @@ if [ "$1" = 'postgres' ]; then
57
55
# look specifically for PG_VERSION, as it is expected in the DB dir
58
56
if [ ! -s " $PGDATA /PG_VERSION" ]; then
59
57
file_env ' POSTGRES_INITDB_ARGS'
58
+ if [ " $POSTGRES_INITDB_XLOGDIR " ]; then
59
+ export POSTGRES_INITDB_ARGS=" $POSTGRES_INITDB_ARGS --xlogdir $POSTGRES_INITDB_XLOGDIR "
60
+ fi
60
61
eval " initdb --username=postgres $POSTGRES_INITDB_ARGS "
61
62
62
63
# check password first so we can output the warning before postgres
Original file line number Diff line number Diff line change @@ -38,12 +38,10 @@ if [ "$1" = 'postgres' ] && [ "$(id -u)" = '0' ]; then
38
38
chmod g+s /var/run/postgresql
39
39
40
40
# Create the transaction log directory before initdb is run (below) so the directory is owned by the correct user
41
- file_env ' POSTGRES_INITDB_XLOGDIR'
42
41
if [ " $POSTGRES_INITDB_XLOGDIR " ]; then
43
42
mkdir -p " $POSTGRES_INITDB_XLOGDIR "
44
- chmod 700 " $POSTGRES_INITDB_XLOGDIR "
45
43
chown -R postgres " $POSTGRES_INITDB_XLOGDIR "
46
- export POSTGRES_INITDB_ARGS= " $POSTGRES_INITDB_ARGS --xlogdir $POSTGRES_INITDB_XLOGDIR "
44
+ chmod 700 " $POSTGRES_INITDB_XLOGDIR "
47
45
fi
48
46
49
47
exec su-exec postgres " $BASH_SOURCE " " $@ "
@@ -57,6 +55,9 @@ if [ "$1" = 'postgres' ]; then
57
55
# look specifically for PG_VERSION, as it is expected in the DB dir
58
56
if [ ! -s " $PGDATA /PG_VERSION" ]; then
59
57
file_env ' POSTGRES_INITDB_ARGS'
58
+ if [ " $POSTGRES_INITDB_XLOGDIR " ]; then
59
+ export POSTGRES_INITDB_ARGS=" $POSTGRES_INITDB_ARGS --xlogdir $POSTGRES_INITDB_XLOGDIR "
60
+ fi
60
61
eval " initdb --username=postgres $POSTGRES_INITDB_ARGS "
61
62
62
63
# check password first so we can output the warning before postgres
Original file line number Diff line number Diff line change @@ -38,12 +38,10 @@ if [ "$1" = 'postgres' ] && [ "$(id -u)" = '0' ]; then
38
38
chmod g+s /var/run/postgresql
39
39
40
40
# Create the transaction log directory before initdb is run (below) so the directory is owned by the correct user
41
- file_env ' POSTGRES_INITDB_XLOGDIR'
42
41
if [ " $POSTGRES_INITDB_XLOGDIR " ]; then
43
42
mkdir -p " $POSTGRES_INITDB_XLOGDIR "
44
- chmod 700 " $POSTGRES_INITDB_XLOGDIR "
45
43
chown -R postgres " $POSTGRES_INITDB_XLOGDIR "
46
- export POSTGRES_INITDB_ARGS= " $POSTGRES_INITDB_ARGS --xlogdir $POSTGRES_INITDB_XLOGDIR "
44
+ chmod 700 " $POSTGRES_INITDB_XLOGDIR "
47
45
fi
48
46
49
47
exec gosu postgres " $BASH_SOURCE " " $@ "
@@ -57,6 +55,9 @@ if [ "$1" = 'postgres' ]; then
57
55
# look specifically for PG_VERSION, as it is expected in the DB dir
58
56
if [ ! -s " $PGDATA /PG_VERSION" ]; then
59
57
file_env ' POSTGRES_INITDB_ARGS'
58
+ if [ " $POSTGRES_INITDB_XLOGDIR " ]; then
59
+ export POSTGRES_INITDB_ARGS=" $POSTGRES_INITDB_ARGS --xlogdir $POSTGRES_INITDB_XLOGDIR "
60
+ fi
60
61
eval " initdb --username=postgres $POSTGRES_INITDB_ARGS "
61
62
62
63
# check password first so we can output the warning before postgres
Original file line number Diff line number Diff line change @@ -38,12 +38,10 @@ if [ "$1" = 'postgres' ] && [ "$(id -u)" = '0' ]; then
38
38
chmod g+s /var/run/postgresql
39
39
40
40
# Create the transaction log directory before initdb is run (below) so the directory is owned by the correct user
41
- file_env ' POSTGRES_INITDB_XLOGDIR'
42
41
if [ " $POSTGRES_INITDB_XLOGDIR " ]; then
43
42
mkdir -p " $POSTGRES_INITDB_XLOGDIR "
44
- chmod 700 " $POSTGRES_INITDB_XLOGDIR "
45
43
chown -R postgres " $POSTGRES_INITDB_XLOGDIR "
46
- export POSTGRES_INITDB_ARGS= " $POSTGRES_INITDB_ARGS --xlogdir $POSTGRES_INITDB_XLOGDIR "
44
+ chmod 700 " $POSTGRES_INITDB_XLOGDIR "
47
45
fi
48
46
49
47
exec gosu postgres " $BASH_SOURCE " " $@ "
@@ -57,6 +55,9 @@ if [ "$1" = 'postgres' ]; then
57
55
# look specifically for PG_VERSION, as it is expected in the DB dir
58
56
if [ ! -s " $PGDATA /PG_VERSION" ]; then
59
57
file_env ' POSTGRES_INITDB_ARGS'
58
+ if [ " $POSTGRES_INITDB_XLOGDIR " ]; then
59
+ export POSTGRES_INITDB_ARGS=" $POSTGRES_INITDB_ARGS --xlogdir $POSTGRES_INITDB_XLOGDIR "
60
+ fi
60
61
eval " initdb --username=postgres $POSTGRES_INITDB_ARGS "
61
62
62
63
# check password first so we can output the warning before postgres
You can’t perform that action at this time.
0 commit comments