Block backup if current hour is after 6 AM

This commit is contained in:
myvesta 2018-09-02 21:40:01 +02:00 committed by GitHub
commit fc187b3863
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -39,11 +39,11 @@ is_backup_enabled
# Action #
#----------------------------------------------------------#
# block backup if current hour is after 8 AM
# block backup if current hour is after 6 AM
if pgrep -x "v-backup-users" > /dev/null
then
hour=$(date +"%H");
while [ "$hour" -gt "8" ]; do
while [ "$hour" -gt "6" ]; do
sleep 300
done
fi