casjay 5eb3ff1598
🗃️ Committing everything that changed 🗃️
applications/
configs/
lists/
wwwroot/
2023-08-22 17:53:03 -04:00

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"