export PATH=$(dirname $0):/bin:/usr/bin:/sbin
+# source the default configuration
. config.sh
- if [ -n "$(find $lastbackupfile -mtime +14)" -o -n "$(cat $statusfile | grep -i incomplete)" ]; then
+# source the system specific configuration
+[ -f /etc/lsbackups.conf ] && . /etc/lsbackups.conf
+
+ 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