projects
/
backups
/
.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge a fix to release-0.1
[backups/.git]
/
scripts
/
cron-pack.sh
diff --git
a/scripts/cron-pack.sh
b/scripts/cron-pack.sh
index 1594d68e5740316264a4cb21eebed7de6e5efb87..906b010ac1c15048a5cda03e48174df938c8f3fd 100755
(executable)
--- a/
scripts/cron-pack.sh
+++ b/
scripts/cron-pack.sh
@@
-8,7
+8,10
@@
export PATH=$(dirname $0):/bin:/usr/bin:/sbin
# source the system specific configuration
[ -f /etc/lsbackups.conf ] && . /etc/lsbackups.conf
# source the system specific configuration
[ -f /etc/lsbackups.conf ] && . /etc/lsbackups.conf
-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
echo "Running backups from cron..."
setsid pack-image.sh
exit 0