File tree 11 files changed +99
-0
lines changed 11 files changed +99
-0
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,15 @@ if [ "$1" = 'postgres' ] && [ "$(id -u)" = '0' ]; then
37
37
chown -R postgres /var/run/postgresql
38
38
chmod g+s /var/run/postgresql
39
39
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
+ if [ " $POSTGRES_INITDB_XLOGDIR " ]; then
43
+ mkdir -p " $POSTGRES_INITDB_XLOGDIR "
44
+ chmod 700 " $POSTGRES_INITDB_XLOGDIR "
45
+ chown -R postgres " $POSTGRES_INITDB_XLOGDIR "
46
+ export POSTGRES_INITDB_ARGS=" $POSTGRES_INITDB_ARGS --xlogdir $POSTGRES_INITDB_XLOGDIR "
47
+ fi
48
+
40
49
exec su-exec postgres " $BASH_SOURCE " " $@ "
41
50
fi
42
51
Original file line number Diff line number Diff line change @@ -37,6 +37,15 @@ if [ "$1" = 'postgres' ] && [ "$(id -u)" = '0' ]; then
37
37
chown -R postgres /var/run/postgresql
38
38
chmod g+s /var/run/postgresql
39
39
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
+ if [ " $POSTGRES_INITDB_XLOGDIR " ]; then
43
+ mkdir -p " $POSTGRES_INITDB_XLOGDIR "
44
+ chmod 700 " $POSTGRES_INITDB_XLOGDIR "
45
+ chown -R postgres " $POSTGRES_INITDB_XLOGDIR "
46
+ export POSTGRES_INITDB_ARGS=" $POSTGRES_INITDB_ARGS --xlogdir $POSTGRES_INITDB_XLOGDIR "
47
+ fi
48
+
40
49
exec gosu postgres " $BASH_SOURCE " " $@ "
41
50
fi
42
51
Original file line number Diff line number Diff line change @@ -37,6 +37,15 @@ if [ "$1" = 'postgres' ] && [ "$(id -u)" = '0' ]; then
37
37
chown -R postgres /var/run/postgresql
38
38
chmod g+s /var/run/postgresql
39
39
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
+ if [ " $POSTGRES_INITDB_XLOGDIR " ]; then
43
+ mkdir -p " $POSTGRES_INITDB_XLOGDIR "
44
+ chmod 700 " $POSTGRES_INITDB_XLOGDIR "
45
+ chown -R postgres " $POSTGRES_INITDB_XLOGDIR "
46
+ export POSTGRES_INITDB_ARGS=" $POSTGRES_INITDB_ARGS --xlogdir $POSTGRES_INITDB_XLOGDIR "
47
+ fi
48
+
40
49
exec su-exec postgres " $BASH_SOURCE " " $@ "
41
50
fi
42
51
Original file line number Diff line number Diff line change @@ -37,6 +37,15 @@ if [ "$1" = 'postgres' ] && [ "$(id -u)" = '0' ]; then
37
37
chown -R postgres /var/run/postgresql
38
38
chmod g+s /var/run/postgresql
39
39
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
+ if [ " $POSTGRES_INITDB_XLOGDIR " ]; then
43
+ mkdir -p " $POSTGRES_INITDB_XLOGDIR "
44
+ chmod 700 " $POSTGRES_INITDB_XLOGDIR "
45
+ chown -R postgres " $POSTGRES_INITDB_XLOGDIR "
46
+ export POSTGRES_INITDB_ARGS=" $POSTGRES_INITDB_ARGS --xlogdir $POSTGRES_INITDB_XLOGDIR "
47
+ fi
48
+
40
49
exec gosu postgres " $BASH_SOURCE " " $@ "
41
50
fi
42
51
Original file line number Diff line number Diff line change @@ -37,6 +37,15 @@ if [ "$1" = 'postgres' ] && [ "$(id -u)" = '0' ]; then
37
37
chown -R postgres /var/run/postgresql
38
38
chmod g+s /var/run/postgresql
39
39
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
+ if [ " $POSTGRES_INITDB_XLOGDIR " ]; then
43
+ mkdir -p " $POSTGRES_INITDB_XLOGDIR "
44
+ chmod 700 " $POSTGRES_INITDB_XLOGDIR "
45
+ chown -R postgres " $POSTGRES_INITDB_XLOGDIR "
46
+ export POSTGRES_INITDB_ARGS=" $POSTGRES_INITDB_ARGS --xlogdir $POSTGRES_INITDB_XLOGDIR "
47
+ fi
48
+
40
49
exec su-exec postgres " $BASH_SOURCE " " $@ "
41
50
fi
42
51
Original file line number Diff line number Diff line change @@ -37,6 +37,15 @@ if [ "$1" = 'postgres' ] && [ "$(id -u)" = '0' ]; then
37
37
chown -R postgres /var/run/postgresql
38
38
chmod g+s /var/run/postgresql
39
39
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
+ if [ " $POSTGRES_INITDB_XLOGDIR " ]; then
43
+ mkdir -p " $POSTGRES_INITDB_XLOGDIR "
44
+ chmod 700 " $POSTGRES_INITDB_XLOGDIR "
45
+ chown -R postgres " $POSTGRES_INITDB_XLOGDIR "
46
+ export POSTGRES_INITDB_ARGS=" $POSTGRES_INITDB_ARGS --xlogdir $POSTGRES_INITDB_XLOGDIR "
47
+ fi
48
+
40
49
exec gosu postgres " $BASH_SOURCE " " $@ "
41
50
fi
42
51
Original file line number Diff line number Diff line change @@ -37,6 +37,15 @@ if [ "$1" = 'postgres' ] && [ "$(id -u)" = '0' ]; then
37
37
chown -R postgres /var/run/postgresql
38
38
chmod g+s /var/run/postgresql
39
39
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
+ if [ " $POSTGRES_INITDB_XLOGDIR " ]; then
43
+ mkdir -p " $POSTGRES_INITDB_XLOGDIR "
44
+ chmod 700 " $POSTGRES_INITDB_XLOGDIR "
45
+ chown -R postgres " $POSTGRES_INITDB_XLOGDIR "
46
+ export POSTGRES_INITDB_ARGS=" $POSTGRES_INITDB_ARGS --xlogdir $POSTGRES_INITDB_XLOGDIR "
47
+ fi
48
+
40
49
exec su-exec postgres " $BASH_SOURCE " " $@ "
41
50
fi
42
51
Original file line number Diff line number Diff line change @@ -37,6 +37,15 @@ if [ "$1" = 'postgres' ] && [ "$(id -u)" = '0' ]; then
37
37
chown -R postgres /var/run/postgresql
38
38
chmod g+s /var/run/postgresql
39
39
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
+ if [ " $POSTGRES_INITDB_XLOGDIR " ]; then
43
+ mkdir -p " $POSTGRES_INITDB_XLOGDIR "
44
+ chmod 700 " $POSTGRES_INITDB_XLOGDIR "
45
+ chown -R postgres " $POSTGRES_INITDB_XLOGDIR "
46
+ export POSTGRES_INITDB_ARGS=" $POSTGRES_INITDB_ARGS --xlogdir $POSTGRES_INITDB_XLOGDIR "
47
+ fi
48
+
40
49
exec gosu postgres " $BASH_SOURCE " " $@ "
41
50
fi
42
51
Original file line number Diff line number Diff line change @@ -37,6 +37,15 @@ if [ "$1" = 'postgres' ] && [ "$(id -u)" = '0' ]; then
37
37
chown -R postgres /var/run/postgresql
38
38
chmod g+s /var/run/postgresql
39
39
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
+ if [ " $POSTGRES_INITDB_XLOGDIR " ]; then
43
+ mkdir -p " $POSTGRES_INITDB_XLOGDIR "
44
+ chmod 700 " $POSTGRES_INITDB_XLOGDIR "
45
+ chown -R postgres " $POSTGRES_INITDB_XLOGDIR "
46
+ export POSTGRES_INITDB_ARGS=" $POSTGRES_INITDB_ARGS --xlogdir $POSTGRES_INITDB_XLOGDIR "
47
+ fi
48
+
40
49
exec su-exec postgres " $BASH_SOURCE " " $@ "
41
50
fi
42
51
Original file line number Diff line number Diff line change @@ -37,6 +37,15 @@ if [ "$1" = 'postgres' ] && [ "$(id -u)" = '0' ]; then
37
37
chown -R postgres /var/run/postgresql
38
38
chmod g+s /var/run/postgresql
39
39
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
+ if [ " $POSTGRES_INITDB_XLOGDIR " ]; then
43
+ mkdir -p " $POSTGRES_INITDB_XLOGDIR "
44
+ chmod 700 " $POSTGRES_INITDB_XLOGDIR "
45
+ chown -R postgres " $POSTGRES_INITDB_XLOGDIR "
46
+ export POSTGRES_INITDB_ARGS=" $POSTGRES_INITDB_ARGS --xlogdir $POSTGRES_INITDB_XLOGDIR "
47
+ fi
48
+
40
49
exec gosu postgres " $BASH_SOURCE " " $@ "
41
50
fi
42
51
Original file line number Diff line number Diff line change @@ -37,6 +37,15 @@ if [ "$1" = 'postgres' ] && [ "$(id -u)" = '0' ]; then
37
37
chown -R postgres /var/run/postgresql
38
38
chmod g+s /var/run/postgresql
39
39
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
+ if [ " $POSTGRES_INITDB_XLOGDIR " ]; then
43
+ mkdir -p " $POSTGRES_INITDB_XLOGDIR "
44
+ chmod 700 " $POSTGRES_INITDB_XLOGDIR "
45
+ chown -R postgres " $POSTGRES_INITDB_XLOGDIR "
46
+ export POSTGRES_INITDB_ARGS=" $POSTGRES_INITDB_ARGS --xlogdir $POSTGRES_INITDB_XLOGDIR "
47
+ fi
48
+
40
49
exec gosu postgres " $BASH_SOURCE " " $@ "
41
50
fi
42
51
You can’t perform that action at this time.
0 commit comments