mirror of
https://github.com/casjaysdevdocker/tools
synced 2025-01-18 18:34:29 -05:00
5eb3ff1598
applications/ configs/ lists/ wwwroot/
9 lines
384 B
Bash
9 lines
384 B
Bash
SERVICE_USER="postgres" # execute command as another user
|
|
EXEC_CMD_BIN="postgres" # command to execute
|
|
EXEC_CMD_ARGS="-D $DATABASE_DIR" # command arguments
|
|
|
|
if [ ! -s "$DATABASE_DIR/PG_VERSION" ]; then
|
|
sudo -u $user initdb --username="$user" -A md5 --pwfile="${ROOT_FILE_PREFIX}/${SERVICE_NAME}_pass" -D "$DATABASE_DIR" >/dev/null
|
|
fi
|
|
chmod -f 0750 "$DATABASE_DIR"
|