From: Carl Baldwin Date: Fri, 25 Nov 2005 18:19:24 +0000 (-0700) Subject: Fix logic to tell if 15 days have past since last backup. X-Git-Tag: release-0.4~15^2 X-Git-Url: http://git.pippins.net/embedvideo/.git/%22%22.%24thumbnail.%22/%24link?a=commitdiff_plain;h=89d2e005aadc06c608545fb477356cb3b4d12bed;p=backups%2F.git Fix logic to tell if 15 days have past since last backup. --- 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