Skip to content

Commit 41110bf

Browse files
authored
Restart apache when enter wait-backup state
1 parent b7b0570 commit 41110bf

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

bin/v-backup-user

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,15 @@ is_backup_enabled
4040
#----------------------------------------------------------#
4141

4242
# block backup if current hour is after 6 AM
43+
WAIT_LOOP_ENTERED=0
4344
if pgrep -x "v-backup-users" > /dev/null
4445
then
4546
hour=$(date +"%H");
4647
while [ "$hour" -gt "6" ]; do
48+
if [ "$WAIT_LOOP_ENTERED" -eq 0 ]; then
49+
$BIN/v-restart-web-backend
50+
fi
51+
WAIT_LOOP_ENTERED=1
4752
current_date_time="`date "+%Y-%m-%d %H:%M:%S"`";
4853
echo "$current_date_time - wait for backup user $user - hour $hour";
4954
sleep 300

0 commit comments

Comments
 (0)