Skip to content

Commit 3743ca3

Browse files
Add Archive Directory and Update $PGDATA permission (#41)
Signed-off-by: souravbiswassanto <[email protected]>
1 parent 2b47daf commit 3743ca3

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

scripts/run.sh

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@ if [[ "$PITR_RESTORE" == "true" ]]; then
1919
done
2020
fi
2121

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

35+
if [[ "$ARCHIVER_ENABLED" == "true" && ! -d "$ARCHIVE_STATUS_PATH" && "$ARCHIVE_STATUS_PATH" != "" ]];then
36+
mkdir -m 0750 -p "$ARCHIVE_PATH"
37+
mkdir -m 0750 -p "$ARCHIVE_STATUS_PATH"
38+
mkdir -m 0750 -p "$LAST_ARCHIVED_FILE_INFO_DIR"
39+
fi
40+
3841
if [[ -e /run_scripts/role/run.sh ]] && [[ "$STOP" = false ]]; then
3942
echo "running the initial script ..."
4043
if [[ $REMOTE_REPLICA == "true" ]]; then

0 commit comments

Comments
 (0)