File tree Expand file tree Collapse file tree 11 files changed +88
-0
lines changed Expand file tree Collapse file tree 11 files changed +88
-0
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,14 @@ 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
+ if [ " $POSTGRES_INITDB_XLOGDIR " ]; then
42
+ mkdir -p " $POSTGRES_INITDB_XLOGDIR "
43
+ chmod 700 " $POSTGRES_INITDB_XLOGDIR "
44
+ chown -R postgres " $POSTGRES_INITDB_XLOGDIR "
45
+ export POSTGRES_INITDB_ARGS=" $POSTGRES_INITDB_XLOGDIR --xlogdir $POSTGRES_INITDB_XLOGDIR "
46
+ fi
47
+
40
48
exec su-exec postgres " $BASH_SOURCE " " $@ "
41
49
fi
42
50
Original file line number Diff line number Diff line change @@ -37,6 +37,14 @@ 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
+ if [ " $POSTGRES_INITDB_XLOGDIR " ]; then
42
+ mkdir -p " $POSTGRES_INITDB_XLOGDIR "
43
+ chmod 700 " $POSTGRES_INITDB_XLOGDIR "
44
+ chown -R postgres " $POSTGRES_INITDB_XLOGDIR "
45
+ export POSTGRES_INITDB_ARGS=" $POSTGRES_INITDB_XLOGDIR --xlogdir $POSTGRES_INITDB_XLOGDIR "
46
+ fi
47
+
40
48
exec gosu postgres " $BASH_SOURCE " " $@ "
41
49
fi
42
50
Original file line number Diff line number Diff line change @@ -37,6 +37,14 @@ 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
+ if [ " $POSTGRES_INITDB_XLOGDIR " ]; then
42
+ mkdir -p " $POSTGRES_INITDB_XLOGDIR "
43
+ chmod 700 " $POSTGRES_INITDB_XLOGDIR "
44
+ chown -R postgres " $POSTGRES_INITDB_XLOGDIR "
45
+ export POSTGRES_INITDB_ARGS=" $POSTGRES_INITDB_XLOGDIR --xlogdir $POSTGRES_INITDB_XLOGDIR "
46
+ fi
47
+
40
48
exec su-exec postgres " $BASH_SOURCE " " $@ "
41
49
fi
42
50
Original file line number Diff line number Diff line change @@ -37,6 +37,14 @@ 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
+ if [ " $POSTGRES_INITDB_XLOGDIR " ]; then
42
+ mkdir -p " $POSTGRES_INITDB_XLOGDIR "
43
+ chmod 700 " $POSTGRES_INITDB_XLOGDIR "
44
+ chown -R postgres " $POSTGRES_INITDB_XLOGDIR "
45
+ export POSTGRES_INITDB_ARGS=" $POSTGRES_INITDB_XLOGDIR --xlogdir $POSTGRES_INITDB_XLOGDIR "
46
+ fi
47
+
40
48
exec gosu postgres " $BASH_SOURCE " " $@ "
41
49
fi
42
50
Original file line number Diff line number Diff line change @@ -37,6 +37,14 @@ 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
+ if [ " $POSTGRES_INITDB_XLOGDIR " ]; then
42
+ mkdir -p " $POSTGRES_INITDB_XLOGDIR "
43
+ chmod 700 " $POSTGRES_INITDB_XLOGDIR "
44
+ chown -R postgres " $POSTGRES_INITDB_XLOGDIR "
45
+ export POSTGRES_INITDB_ARGS=" $POSTGRES_INITDB_XLOGDIR --xlogdir $POSTGRES_INITDB_XLOGDIR "
46
+ fi
47
+
40
48
exec su-exec postgres " $BASH_SOURCE " " $@ "
41
49
fi
42
50
Original file line number Diff line number Diff line change @@ -37,6 +37,14 @@ 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
+ if [ " $POSTGRES_INITDB_XLOGDIR " ]; then
42
+ mkdir -p " $POSTGRES_INITDB_XLOGDIR "
43
+ chmod 700 " $POSTGRES_INITDB_XLOGDIR "
44
+ chown -R postgres " $POSTGRES_INITDB_XLOGDIR "
45
+ export POSTGRES_INITDB_ARGS=" $POSTGRES_INITDB_XLOGDIR --xlogdir $POSTGRES_INITDB_XLOGDIR "
46
+ fi
47
+
40
48
exec gosu postgres " $BASH_SOURCE " " $@ "
41
49
fi
42
50
Original file line number Diff line number Diff line change @@ -37,6 +37,14 @@ 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
+ if [ " $POSTGRES_INITDB_XLOGDIR " ]; then
42
+ mkdir -p " $POSTGRES_INITDB_XLOGDIR "
43
+ chmod 700 " $POSTGRES_INITDB_XLOGDIR "
44
+ chown -R postgres " $POSTGRES_INITDB_XLOGDIR "
45
+ export POSTGRES_INITDB_ARGS=" $POSTGRES_INITDB_XLOGDIR --xlogdir $POSTGRES_INITDB_XLOGDIR "
46
+ fi
47
+
40
48
exec su-exec postgres " $BASH_SOURCE " " $@ "
41
49
fi
42
50
Original file line number Diff line number Diff line change @@ -37,6 +37,14 @@ 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
+ if [ " $POSTGRES_INITDB_XLOGDIR " ]; then
42
+ mkdir -p " $POSTGRES_INITDB_XLOGDIR "
43
+ chmod 700 " $POSTGRES_INITDB_XLOGDIR "
44
+ chown -R postgres " $POSTGRES_INITDB_XLOGDIR "
45
+ export POSTGRES_INITDB_ARGS=" $POSTGRES_INITDB_XLOGDIR --xlogdir $POSTGRES_INITDB_XLOGDIR "
46
+ fi
47
+
40
48
exec gosu postgres " $BASH_SOURCE " " $@ "
41
49
fi
42
50
Original file line number Diff line number Diff line change @@ -37,6 +37,14 @@ 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
+ if [ " $POSTGRES_INITDB_XLOGDIR " ]; then
42
+ mkdir -p " $POSTGRES_INITDB_XLOGDIR "
43
+ chmod 700 " $POSTGRES_INITDB_XLOGDIR "
44
+ chown -R postgres " $POSTGRES_INITDB_XLOGDIR "
45
+ export POSTGRES_INITDB_ARGS=" $POSTGRES_INITDB_XLOGDIR --xlogdir $POSTGRES_INITDB_XLOGDIR "
46
+ fi
47
+
40
48
exec su-exec postgres " $BASH_SOURCE " " $@ "
41
49
fi
42
50
Original file line number Diff line number Diff line change @@ -37,6 +37,14 @@ 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
+ if [ " $POSTGRES_INITDB_XLOGDIR " ]; then
42
+ mkdir -p " $POSTGRES_INITDB_XLOGDIR "
43
+ chmod 700 " $POSTGRES_INITDB_XLOGDIR "
44
+ chown -R postgres " $POSTGRES_INITDB_XLOGDIR "
45
+ export POSTGRES_INITDB_ARGS=" $POSTGRES_INITDB_XLOGDIR --xlogdir $POSTGRES_INITDB_XLOGDIR "
46
+ fi
47
+
40
48
exec gosu postgres " $BASH_SOURCE " " $@ "
41
49
fi
42
50
Original file line number Diff line number Diff line change @@ -37,6 +37,14 @@ 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
+ if [ " $POSTGRES_INITDB_XLOGDIR " ]; then
42
+ mkdir -p " $POSTGRES_INITDB_XLOGDIR "
43
+ chmod 700 " $POSTGRES_INITDB_XLOGDIR "
44
+ chown -R postgres " $POSTGRES_INITDB_XLOGDIR "
45
+ export POSTGRES_INITDB_ARGS=" $POSTGRES_INITDB_XLOGDIR --xlogdir $POSTGRES_INITDB_XLOGDIR "
46
+ fi
47
+
40
48
exec gosu postgres " $BASH_SOURCE " " $@ "
41
49
fi
42
50
You can’t perform that action at this time.
0 commit comments