Requested backups should also wait for night

This commit is contained in:
dpeca 2019-03-28 14:28:48 +01:00 committed by GitHub
commit cd3e1f9585
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -967,8 +967,8 @@ wait_for_backup_if_it_is_not_time_for_backup() {
# block backup if current hour is after 6 AM # block backup if current hour is after 6 AM
WAIT_LOOP_ENTERED=0 WAIT_LOOP_ENTERED=0
if pgrep -x "v-backup-users" > /dev/null # if pgrep -x "v-backup-users" > /dev/null
then # then
hour=$(date +"%H"); hour=$(date +"%H");
while [ "$hour" -gt "6" ] || [ "$hour" -lt "1" ]; do while [ "$hour" -gt "6" ] || [ "$hour" -lt "1" ]; do
# if [ "$WAIT_LOOP_ENTERED" -eq 0 ]; then # if [ "$WAIT_LOOP_ENTERED" -eq 0 ]; then
@ -985,5 +985,5 @@ wait_for_backup_if_it_is_not_time_for_backup() {
sleep 300 sleep 300
hour=$(date +"%H"); hour=$(date +"%H");
done done
fi # fi
} }