From 89d2e005aadc06c608545fb477356cb3b4d12bed Mon Sep 17 00:00:00 2001 From: Carl Baldwin Date: Fri, 25 Nov 2005 11:19:24 -0700 Subject: [PATCH] Fix logic to tell if 15 days have past since last backup. --- scripts/cron-pack.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/cron-pack.sh b/scripts/cron-pack.sh index a757da9..2127e42 100755 --- a/scripts/cron-pack.sh +++ b/scripts/cron-pack.sh @@ -4,7 +4,10 @@ export PATH=$(dirname $0):/bin:/usr/bin:/sbin . config.sh -if [ -n "$(find $lastbackupfile -mtime +14)" -o -n "$(cat $statusfile | grep -i incomplete)" ]; then +days=15 +minutes=$(($days * 1440 - 60)) + +if [ -n "$(find $lastbackupfile -mmin +$minutes)" -o -n "$(cat $statusfile | grep -i incomplete)" ]; then echo "Running backups from cron..." setsid pack-image.sh exit 0 -- 2.34.1