diff --git a/scripts/restore.sh b/scripts/restore.sh index a5c7723..8361229 100755 --- a/scripts/restore.sh +++ b/scripts/restore.sh @@ -2,7 +2,9 @@ LOG_DIR="$PGDATA"/log LOG_FILE_PATTERN="postgresql-*.log" -HOST=$(hostname) +# bash sets HOSTNAME itself; the hostname binary is absent from the RHEL/CentOS +# Stream based images, and without it every pod would take the replica path below. +HOST="$HOSTNAME" mkdir -p $PGDATA chmod 0700 "$PGDATA"