projects
/
backups
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
51ba9eb
)
Fix logic to tell if 15 days have past since last backup.
release-0.1.1
author
Carl Baldwin
<cnb@ball.(none)>
Fri, 25 Nov 2005 18:19:24 +0000
(11:19 -0700)
committer
Carl Baldwin
<cnb@ball.(none)>
Fri, 25 Nov 2005 18:19:24 +0000
(11:19 -0700)
scripts/cron-pack.sh
patch
|
blob
|
history
diff --git
a/scripts/cron-pack.sh
b/scripts/cron-pack.sh
index a757da9a38a92456578303b880c5e4fede5d6bb4..2127e42b119b723be914f001b9d6c141ff1b15ab 100755
(executable)
--- 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