mirror of
https://github.com/myvesta/vesta
synced 2025-08-14 18:49:21 -07:00
Restart apache when enter wait-backup state
This commit is contained in:
parent
b7b0570cc4
commit
41110bf27d
1 changed files with 5 additions and 0 deletions
|
@ -40,10 +40,15 @@ is_backup_enabled
|
|||
#----------------------------------------------------------#
|
||||
|
||||
# block backup if current hour is after 6 AM
|
||||
WAIT_LOOP_ENTERED=0
|
||||
if pgrep -x "v-backup-users" > /dev/null
|
||||
then
|
||||
hour=$(date +"%H");
|
||||
while [ "$hour" -gt "6" ]; do
|
||||
if [ "$WAIT_LOOP_ENTERED" -eq 0 ]; then
|
||||
$BIN/v-restart-web-backend
|
||||
fi
|
||||
WAIT_LOOP_ENTERED=1
|
||||
current_date_time="`date "+%Y-%m-%d %H:%M:%S"`";
|
||||
echo "$current_date_time - wait for backup user $user - hour $hour";
|
||||
sleep 300
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue