From: Carl Baldwin <cnb@ball.(none)>
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.1.1
X-Git-Url: http://git.pippins.net/%7Blink_participation%7D?a=commitdiff_plain;h=bd85284803a312ea9b58a29e6ad7b88c7873196f;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