Skip to content

Commit

Permalink
Add Archive Directory and Update $PGDATA permission (#41)
Browse files Browse the repository at this point in the history
Signed-off-by: souravbiswassanto <[email protected]>
  • Loading branch information
souravbiswassanto authored Jan 28, 2025
1 parent 2b47daf commit 3743ca3
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions scripts/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@ if [[ "$PITR_RESTORE" == "true" ]]; then
done
fi

if [[ -d $PGDATA && "$PITR_RS" == "fscopy" ]];then
chmod 0700 $PGDATA
fi
#going to change this with the check of process id
rm -f "$PGDATA"/postmaster.pid
echo "waiting for the role to be decided ..."
Expand All @@ -35,6 +32,12 @@ while true; do
fi
fi

if [[ "$ARCHIVER_ENABLED" == "true" && ! -d "$ARCHIVE_STATUS_PATH" && "$ARCHIVE_STATUS_PATH" != "" ]];then
mkdir -m 0750 -p "$ARCHIVE_PATH"
mkdir -m 0750 -p "$ARCHIVE_STATUS_PATH"
mkdir -m 0750 -p "$LAST_ARCHIVED_FILE_INFO_DIR"
fi

if [[ -e /run_scripts/role/run.sh ]] && [[ "$STOP" = false ]]; then
echo "running the initial script ..."
if [[ $REMOTE_REPLICA == "true" ]]; then
Expand Down

0 comments on commit 3743ca3

Please sign in to comment.