You've already forked postgres
mirror of
https://github.com/docker-library/postgres.git
synced 2025-07-28 10:42:06 +03:00
Add missing -n's to bash test
This commit is contained in:
@ -44,7 +44,7 @@ docker_create_db_directories() {
|
|||||||
chmod 775 /var/run/postgresql || :
|
chmod 775 /var/run/postgresql || :
|
||||||
|
|
||||||
# Create the transaction log directory before initdb is run so the directory is owned by the correct user
|
# Create the transaction log directory before initdb is run so the directory is owned by the correct user
|
||||||
if [ "$POSTGRES_INITDB_WALDIR" ]; then
|
if [ -n "$POSTGRES_INITDB_WALDIR" ]; then
|
||||||
mkdir -p "$POSTGRES_INITDB_WALDIR"
|
mkdir -p "$POSTGRES_INITDB_WALDIR"
|
||||||
if [ "$user" = '0' ]; then
|
if [ "$user" = '0' ]; then
|
||||||
find "$POSTGRES_INITDB_WALDIR" \! -user postgres -exec chown postgres '{}' +
|
find "$POSTGRES_INITDB_WALDIR" \! -user postgres -exec chown postgres '{}' +
|
||||||
@ -74,7 +74,7 @@ docker_init_database_dir() {
|
|||||||
echo "postgres:x:$(id -g):" > "$NSS_WRAPPER_GROUP"
|
echo "postgres:x:$(id -g):" > "$NSS_WRAPPER_GROUP"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$POSTGRES_INITDB_WALDIR" ]; then
|
if [ -n "$POSTGRES_INITDB_WALDIR" ]; then
|
||||||
set -- --waldir "$POSTGRES_INITDB_WALDIR" "$@"
|
set -- --waldir "$POSTGRES_INITDB_WALDIR" "$@"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@ docker_create_db_directories() {
|
|||||||
chmod 775 /var/run/postgresql || :
|
chmod 775 /var/run/postgresql || :
|
||||||
|
|
||||||
# Create the transaction log directory before initdb is run so the directory is owned by the correct user
|
# Create the transaction log directory before initdb is run so the directory is owned by the correct user
|
||||||
if [ "$POSTGRES_INITDB_WALDIR" ]; then
|
if [ -n "$POSTGRES_INITDB_WALDIR" ]; then
|
||||||
mkdir -p "$POSTGRES_INITDB_WALDIR"
|
mkdir -p "$POSTGRES_INITDB_WALDIR"
|
||||||
if [ "$user" = '0' ]; then
|
if [ "$user" = '0' ]; then
|
||||||
find "$POSTGRES_INITDB_WALDIR" \! -user postgres -exec chown postgres '{}' +
|
find "$POSTGRES_INITDB_WALDIR" \! -user postgres -exec chown postgres '{}' +
|
||||||
@ -74,7 +74,7 @@ docker_init_database_dir() {
|
|||||||
echo "postgres:x:$(id -g):" > "$NSS_WRAPPER_GROUP"
|
echo "postgres:x:$(id -g):" > "$NSS_WRAPPER_GROUP"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$POSTGRES_INITDB_WALDIR" ]; then
|
if [ -n "$POSTGRES_INITDB_WALDIR" ]; then
|
||||||
set -- --waldir "$POSTGRES_INITDB_WALDIR" "$@"
|
set -- --waldir "$POSTGRES_INITDB_WALDIR" "$@"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@ docker_create_db_directories() {
|
|||||||
chmod 775 /var/run/postgresql || :
|
chmod 775 /var/run/postgresql || :
|
||||||
|
|
||||||
# Create the transaction log directory before initdb is run so the directory is owned by the correct user
|
# Create the transaction log directory before initdb is run so the directory is owned by the correct user
|
||||||
if [ "$POSTGRES_INITDB_WALDIR" ]; then
|
if [ -n "$POSTGRES_INITDB_WALDIR" ]; then
|
||||||
mkdir -p "$POSTGRES_INITDB_WALDIR"
|
mkdir -p "$POSTGRES_INITDB_WALDIR"
|
||||||
if [ "$user" = '0' ]; then
|
if [ "$user" = '0' ]; then
|
||||||
find "$POSTGRES_INITDB_WALDIR" \! -user postgres -exec chown postgres '{}' +
|
find "$POSTGRES_INITDB_WALDIR" \! -user postgres -exec chown postgres '{}' +
|
||||||
@ -74,7 +74,7 @@ docker_init_database_dir() {
|
|||||||
echo "postgres:x:$(id -g):" > "$NSS_WRAPPER_GROUP"
|
echo "postgres:x:$(id -g):" > "$NSS_WRAPPER_GROUP"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$POSTGRES_INITDB_WALDIR" ]; then
|
if [ -n "$POSTGRES_INITDB_WALDIR" ]; then
|
||||||
set -- --waldir "$POSTGRES_INITDB_WALDIR" "$@"
|
set -- --waldir "$POSTGRES_INITDB_WALDIR" "$@"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@ docker_create_db_directories() {
|
|||||||
chmod 775 /var/run/postgresql || :
|
chmod 775 /var/run/postgresql || :
|
||||||
|
|
||||||
# Create the transaction log directory before initdb is run so the directory is owned by the correct user
|
# Create the transaction log directory before initdb is run so the directory is owned by the correct user
|
||||||
if [ "$POSTGRES_INITDB_WALDIR" ]; then
|
if [ -n "$POSTGRES_INITDB_WALDIR" ]; then
|
||||||
mkdir -p "$POSTGRES_INITDB_WALDIR"
|
mkdir -p "$POSTGRES_INITDB_WALDIR"
|
||||||
if [ "$user" = '0' ]; then
|
if [ "$user" = '0' ]; then
|
||||||
find "$POSTGRES_INITDB_WALDIR" \! -user postgres -exec chown postgres '{}' +
|
find "$POSTGRES_INITDB_WALDIR" \! -user postgres -exec chown postgres '{}' +
|
||||||
@ -74,7 +74,7 @@ docker_init_database_dir() {
|
|||||||
echo "postgres:x:$(id -g):" > "$NSS_WRAPPER_GROUP"
|
echo "postgres:x:$(id -g):" > "$NSS_WRAPPER_GROUP"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$POSTGRES_INITDB_WALDIR" ]; then
|
if [ -n "$POSTGRES_INITDB_WALDIR" ]; then
|
||||||
set -- --waldir "$POSTGRES_INITDB_WALDIR" "$@"
|
set -- --waldir "$POSTGRES_INITDB_WALDIR" "$@"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@ docker_create_db_directories() {
|
|||||||
chmod 775 /var/run/postgresql || :
|
chmod 775 /var/run/postgresql || :
|
||||||
|
|
||||||
# Create the transaction log directory before initdb is run so the directory is owned by the correct user
|
# Create the transaction log directory before initdb is run so the directory is owned by the correct user
|
||||||
if [ "$POSTGRES_INITDB_WALDIR" ]; then
|
if [ -n "$POSTGRES_INITDB_WALDIR" ]; then
|
||||||
mkdir -p "$POSTGRES_INITDB_WALDIR"
|
mkdir -p "$POSTGRES_INITDB_WALDIR"
|
||||||
if [ "$user" = '0' ]; then
|
if [ "$user" = '0' ]; then
|
||||||
find "$POSTGRES_INITDB_WALDIR" \! -user postgres -exec chown postgres '{}' +
|
find "$POSTGRES_INITDB_WALDIR" \! -user postgres -exec chown postgres '{}' +
|
||||||
@ -74,7 +74,7 @@ docker_init_database_dir() {
|
|||||||
echo "postgres:x:$(id -g):" > "$NSS_WRAPPER_GROUP"
|
echo "postgres:x:$(id -g):" > "$NSS_WRAPPER_GROUP"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$POSTGRES_INITDB_WALDIR" ]; then
|
if [ -n "$POSTGRES_INITDB_WALDIR" ]; then
|
||||||
set -- --waldir "$POSTGRES_INITDB_WALDIR" "$@"
|
set -- --waldir "$POSTGRES_INITDB_WALDIR" "$@"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@ docker_create_db_directories() {
|
|||||||
chmod 775 /var/run/postgresql || :
|
chmod 775 /var/run/postgresql || :
|
||||||
|
|
||||||
# Create the transaction log directory before initdb is run so the directory is owned by the correct user
|
# Create the transaction log directory before initdb is run so the directory is owned by the correct user
|
||||||
if [ "$POSTGRES_INITDB_WALDIR" ]; then
|
if [ -n "$POSTGRES_INITDB_WALDIR" ]; then
|
||||||
mkdir -p "$POSTGRES_INITDB_WALDIR"
|
mkdir -p "$POSTGRES_INITDB_WALDIR"
|
||||||
if [ "$user" = '0' ]; then
|
if [ "$user" = '0' ]; then
|
||||||
find "$POSTGRES_INITDB_WALDIR" \! -user postgres -exec chown postgres '{}' +
|
find "$POSTGRES_INITDB_WALDIR" \! -user postgres -exec chown postgres '{}' +
|
||||||
@ -74,7 +74,7 @@ docker_init_database_dir() {
|
|||||||
echo "postgres:x:$(id -g):" > "$NSS_WRAPPER_GROUP"
|
echo "postgres:x:$(id -g):" > "$NSS_WRAPPER_GROUP"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$POSTGRES_INITDB_WALDIR" ]; then
|
if [ -n "$POSTGRES_INITDB_WALDIR" ]; then
|
||||||
set -- --waldir "$POSTGRES_INITDB_WALDIR" "$@"
|
set -- --waldir "$POSTGRES_INITDB_WALDIR" "$@"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@ docker_create_db_directories() {
|
|||||||
chmod 775 /var/run/postgresql || :
|
chmod 775 /var/run/postgresql || :
|
||||||
|
|
||||||
# Create the transaction log directory before initdb is run so the directory is owned by the correct user
|
# Create the transaction log directory before initdb is run so the directory is owned by the correct user
|
||||||
if [ "$POSTGRES_INITDB_XLOGDIR" ]; then
|
if [ -n "$POSTGRES_INITDB_XLOGDIR" ]; then
|
||||||
mkdir -p "$POSTGRES_INITDB_XLOGDIR"
|
mkdir -p "$POSTGRES_INITDB_XLOGDIR"
|
||||||
if [ "$user" = '0' ]; then
|
if [ "$user" = '0' ]; then
|
||||||
find "$POSTGRES_INITDB_XLOGDIR" \! -user postgres -exec chown postgres '{}' +
|
find "$POSTGRES_INITDB_XLOGDIR" \! -user postgres -exec chown postgres '{}' +
|
||||||
@ -74,7 +74,7 @@ docker_init_database_dir() {
|
|||||||
echo "postgres:x:$(id -g):" > "$NSS_WRAPPER_GROUP"
|
echo "postgres:x:$(id -g):" > "$NSS_WRAPPER_GROUP"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$POSTGRES_INITDB_XLOGDIR" ]; then
|
if [ -n "$POSTGRES_INITDB_XLOGDIR" ]; then
|
||||||
set -- --xlogdir "$POSTGRES_INITDB_XLOGDIR" "$@"
|
set -- --xlogdir "$POSTGRES_INITDB_XLOGDIR" "$@"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@ docker_create_db_directories() {
|
|||||||
chmod 775 /var/run/postgresql || :
|
chmod 775 /var/run/postgresql || :
|
||||||
|
|
||||||
# Create the transaction log directory before initdb is run so the directory is owned by the correct user
|
# Create the transaction log directory before initdb is run so the directory is owned by the correct user
|
||||||
if [ "$POSTGRES_INITDB_XLOGDIR" ]; then
|
if [ -n "$POSTGRES_INITDB_XLOGDIR" ]; then
|
||||||
mkdir -p "$POSTGRES_INITDB_XLOGDIR"
|
mkdir -p "$POSTGRES_INITDB_XLOGDIR"
|
||||||
if [ "$user" = '0' ]; then
|
if [ "$user" = '0' ]; then
|
||||||
find "$POSTGRES_INITDB_XLOGDIR" \! -user postgres -exec chown postgres '{}' +
|
find "$POSTGRES_INITDB_XLOGDIR" \! -user postgres -exec chown postgres '{}' +
|
||||||
@ -74,7 +74,7 @@ docker_init_database_dir() {
|
|||||||
echo "postgres:x:$(id -g):" > "$NSS_WRAPPER_GROUP"
|
echo "postgres:x:$(id -g):" > "$NSS_WRAPPER_GROUP"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$POSTGRES_INITDB_XLOGDIR" ]; then
|
if [ -n "$POSTGRES_INITDB_XLOGDIR" ]; then
|
||||||
set -- --xlogdir "$POSTGRES_INITDB_XLOGDIR" "$@"
|
set -- --xlogdir "$POSTGRES_INITDB_XLOGDIR" "$@"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@ docker_create_db_directories() {
|
|||||||
chmod 775 /var/run/postgresql || :
|
chmod 775 /var/run/postgresql || :
|
||||||
|
|
||||||
# Create the transaction log directory before initdb is run so the directory is owned by the correct user
|
# Create the transaction log directory before initdb is run so the directory is owned by the correct user
|
||||||
if [ "$POSTGRES_INITDB_XLOGDIR" ]; then
|
if [ -n "$POSTGRES_INITDB_XLOGDIR" ]; then
|
||||||
mkdir -p "$POSTGRES_INITDB_XLOGDIR"
|
mkdir -p "$POSTGRES_INITDB_XLOGDIR"
|
||||||
if [ "$user" = '0' ]; then
|
if [ "$user" = '0' ]; then
|
||||||
find "$POSTGRES_INITDB_XLOGDIR" \! -user postgres -exec chown postgres '{}' +
|
find "$POSTGRES_INITDB_XLOGDIR" \! -user postgres -exec chown postgres '{}' +
|
||||||
@ -74,7 +74,7 @@ docker_init_database_dir() {
|
|||||||
echo "postgres:x:$(id -g):" > "$NSS_WRAPPER_GROUP"
|
echo "postgres:x:$(id -g):" > "$NSS_WRAPPER_GROUP"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$POSTGRES_INITDB_XLOGDIR" ]; then
|
if [ -n "$POSTGRES_INITDB_XLOGDIR" ]; then
|
||||||
set -- --xlogdir "$POSTGRES_INITDB_XLOGDIR" "$@"
|
set -- --xlogdir "$POSTGRES_INITDB_XLOGDIR" "$@"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@ docker_create_db_directories() {
|
|||||||
chmod 775 /var/run/postgresql || :
|
chmod 775 /var/run/postgresql || :
|
||||||
|
|
||||||
# Create the transaction log directory before initdb is run so the directory is owned by the correct user
|
# Create the transaction log directory before initdb is run so the directory is owned by the correct user
|
||||||
if [ "$POSTGRES_INITDB_XLOGDIR" ]; then
|
if [ -n "$POSTGRES_INITDB_XLOGDIR" ]; then
|
||||||
mkdir -p "$POSTGRES_INITDB_XLOGDIR"
|
mkdir -p "$POSTGRES_INITDB_XLOGDIR"
|
||||||
if [ "$user" = '0' ]; then
|
if [ "$user" = '0' ]; then
|
||||||
find "$POSTGRES_INITDB_XLOGDIR" \! -user postgres -exec chown postgres '{}' +
|
find "$POSTGRES_INITDB_XLOGDIR" \! -user postgres -exec chown postgres '{}' +
|
||||||
@ -74,7 +74,7 @@ docker_init_database_dir() {
|
|||||||
echo "postgres:x:$(id -g):" > "$NSS_WRAPPER_GROUP"
|
echo "postgres:x:$(id -g):" > "$NSS_WRAPPER_GROUP"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$POSTGRES_INITDB_XLOGDIR" ]; then
|
if [ -n "$POSTGRES_INITDB_XLOGDIR" ]; then
|
||||||
set -- --xlogdir "$POSTGRES_INITDB_XLOGDIR" "$@"
|
set -- --xlogdir "$POSTGRES_INITDB_XLOGDIR" "$@"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@ docker_create_db_directories() {
|
|||||||
chmod 775 /var/run/postgresql || :
|
chmod 775 /var/run/postgresql || :
|
||||||
|
|
||||||
# Create the transaction log directory before initdb is run so the directory is owned by the correct user
|
# Create the transaction log directory before initdb is run so the directory is owned by the correct user
|
||||||
if [ "$POSTGRES_INITDB_XLOGDIR" ]; then
|
if [ -n "$POSTGRES_INITDB_XLOGDIR" ]; then
|
||||||
mkdir -p "$POSTGRES_INITDB_XLOGDIR"
|
mkdir -p "$POSTGRES_INITDB_XLOGDIR"
|
||||||
if [ "$user" = '0' ]; then
|
if [ "$user" = '0' ]; then
|
||||||
find "$POSTGRES_INITDB_XLOGDIR" \! -user postgres -exec chown postgres '{}' +
|
find "$POSTGRES_INITDB_XLOGDIR" \! -user postgres -exec chown postgres '{}' +
|
||||||
@ -74,7 +74,7 @@ docker_init_database_dir() {
|
|||||||
echo "postgres:x:$(id -g):" > "$NSS_WRAPPER_GROUP"
|
echo "postgres:x:$(id -g):" > "$NSS_WRAPPER_GROUP"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$POSTGRES_INITDB_XLOGDIR" ]; then
|
if [ -n "$POSTGRES_INITDB_XLOGDIR" ]; then
|
||||||
set -- --xlogdir "$POSTGRES_INITDB_XLOGDIR" "$@"
|
set -- --xlogdir "$POSTGRES_INITDB_XLOGDIR" "$@"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@ docker_create_db_directories() {
|
|||||||
chmod 775 /var/run/postgresql || :
|
chmod 775 /var/run/postgresql || :
|
||||||
|
|
||||||
# Create the transaction log directory before initdb is run so the directory is owned by the correct user
|
# Create the transaction log directory before initdb is run so the directory is owned by the correct user
|
||||||
if [ "$POSTGRES_INITDB_XLOGDIR" ]; then
|
if [ -n "$POSTGRES_INITDB_XLOGDIR" ]; then
|
||||||
mkdir -p "$POSTGRES_INITDB_XLOGDIR"
|
mkdir -p "$POSTGRES_INITDB_XLOGDIR"
|
||||||
if [ "$user" = '0' ]; then
|
if [ "$user" = '0' ]; then
|
||||||
find "$POSTGRES_INITDB_XLOGDIR" \! -user postgres -exec chown postgres '{}' +
|
find "$POSTGRES_INITDB_XLOGDIR" \! -user postgres -exec chown postgres '{}' +
|
||||||
@ -74,7 +74,7 @@ docker_init_database_dir() {
|
|||||||
echo "postgres:x:$(id -g):" > "$NSS_WRAPPER_GROUP"
|
echo "postgres:x:$(id -g):" > "$NSS_WRAPPER_GROUP"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$POSTGRES_INITDB_XLOGDIR" ]; then
|
if [ -n "$POSTGRES_INITDB_XLOGDIR" ]; then
|
||||||
set -- --xlogdir "$POSTGRES_INITDB_XLOGDIR" "$@"
|
set -- --xlogdir "$POSTGRES_INITDB_XLOGDIR" "$@"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@ docker_create_db_directories() {
|
|||||||
chmod 775 /var/run/postgresql || :
|
chmod 775 /var/run/postgresql || :
|
||||||
|
|
||||||
# Create the transaction log directory before initdb is run so the directory is owned by the correct user
|
# Create the transaction log directory before initdb is run so the directory is owned by the correct user
|
||||||
if [ "$POSTGRES_INITDB_WALDIR" ]; then
|
if [ -n "$POSTGRES_INITDB_WALDIR" ]; then
|
||||||
mkdir -p "$POSTGRES_INITDB_WALDIR"
|
mkdir -p "$POSTGRES_INITDB_WALDIR"
|
||||||
if [ "$user" = '0' ]; then
|
if [ "$user" = '0' ]; then
|
||||||
find "$POSTGRES_INITDB_WALDIR" \! -user postgres -exec chown postgres '{}' +
|
find "$POSTGRES_INITDB_WALDIR" \! -user postgres -exec chown postgres '{}' +
|
||||||
@ -74,7 +74,7 @@ docker_init_database_dir() {
|
|||||||
echo "postgres:x:$(id -g):" > "$NSS_WRAPPER_GROUP"
|
echo "postgres:x:$(id -g):" > "$NSS_WRAPPER_GROUP"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$POSTGRES_INITDB_WALDIR" ]; then
|
if [ -n "$POSTGRES_INITDB_WALDIR" ]; then
|
||||||
set -- --waldir "$POSTGRES_INITDB_WALDIR" "$@"
|
set -- --waldir "$POSTGRES_INITDB_WALDIR" "$@"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user