From 233a3a37774deaa5c0fb2152454f03dad252f3e9 Mon Sep 17 00:00:00 2001 From: dpeca Date: Sat, 27 Apr 2019 16:03:10 +0200 Subject: [PATCH] Adding $ALLOW_BACKUP_ANYTIME --- func/main.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/func/main.sh b/func/main.sh index 3d731e11..6a472e1f 100644 --- a/func/main.sh +++ b/func/main.sh @@ -966,9 +966,8 @@ wait_for_backup_if_it_is_not_time_for_backup() { done # block backup if current hour is after 6 AM - WAIT_LOOP_ENTERED=0 - # if pgrep -x "v-backup-users" > /dev/null - # then + if [ -z "ALLOW_BACKUP_ANYTIME" ]; then + WAIT_LOOP_ENTERED=0 hour=$(date +"%H"); while [ "$hour" -gt "6" ] || [ "$hour" -lt "1" ]; do # if [ "$WAIT_LOOP_ENTERED" -eq 0 ]; then @@ -985,5 +984,5 @@ wait_for_backup_if_it_is_not_time_for_backup() { sleep 300 hour=$(date +"%H"); done - # fi + fi }