projects
/
backups
/
.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
I think we can safely give rundir a default value.
[backups/.git]
/
scripts
/
cron-pack.sh
diff --git
a/scripts/cron-pack.sh
b/scripts/cron-pack.sh
index 62c65ad746dcac88e2bb5413ab212694e88bd1db..906b010ac1c15048a5cda03e48174df938c8f3fd 100755
(executable)
--- a/
scripts/cron-pack.sh
+++ b/
scripts/cron-pack.sh
@@
-6,12
+6,12
@@
export PATH=$(dirname $0):/bin:/usr/bin:/sbin
. config.sh
# source the system specific configuration
. config.sh
# source the system specific configuration
-if [ -f /etc/lsbackups.conf ]
-then
- . /etc/lsbackups.conf
-fi
+[ -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