projects
/
backups
/
.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Bump the revision number
[backups/.git]
/
scripts
/
cron-pack.sh
diff --git
a/scripts/cron-pack.sh
b/scripts/cron-pack.sh
index 1594d68e5740316264a4cb21eebed7de6e5efb87..f34489a0d3d59ac909b0d228a7c3d5435556b3de 100755
(executable)
--- a/
scripts/cron-pack.sh
+++ b/
scripts/cron-pack.sh
@@
-8,7
+8,9
@@
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
+minutes=$(($backupeveryXdays * 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