mirror of
https://github.com/myvesta/vesta
synced 2025-08-20 13:24:25 -07:00
Block backup if current hour is after 8 AM
This commit is contained in:
parent
2c05d7bcf2
commit
8d4a2c1707
1 changed files with 9 additions and 0 deletions
|
@ -39,6 +39,15 @@ is_backup_enabled
|
|||
# Action #
|
||||
#----------------------------------------------------------#
|
||||
|
||||
# block backup if current hour is after 8 AM
|
||||
if pgrep -x "v-backup-users" > /dev/null
|
||||
then
|
||||
hour=$(date +"%H");
|
||||
while [ "$hour" -gt "8" ]; do
|
||||
sleep 300
|
||||
done
|
||||
fi
|
||||
|
||||
# Set backup directory if undefined
|
||||
if [ -z "$BACKUP" ]; then
|
||||
BACKUP=/backup
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue