X-Git-Url: https://git.stderr.nl/gitweb?a=blobdiff_plain;f=src%2Fbackupninja.in;h=e4f5ea73dc53afd6084b5c6563240e0a14d6c0a1;hb=90316a33524fe051cbe110904391f317df13a7ac;hp=57936da1d4b2ce5a521dcbdae05c3ee7ed218aa7;hpb=489e294c50b6cba7545a110d26edd43e6b6e55ea;p=matthijs%2Fupstream%2Fbackupninja.git diff --git a/src/backupninja.in b/src/backupninja.in index 57936da..e4f5ea7 100755 --- a/src/backupninja.in +++ b/src/backupninja.in @@ -476,7 +476,11 @@ errormsg="" if [ "$singlerun" ]; then files=$singlerun else - files=`find $configdirectory -mindepth 1 -maxdepth 1 -type f ! -name '.*.swp' | sort -n` + files=`find $configdirectory -follow -mindepth 1 -maxdepth 1 -type f ! -name '.*.swp' | sort -n` + + if [ -z "$files" ]; then + fatal "No backup actions configured in '$configdirectory', run ninjahelper!" + fi fi for file in $files; do @@ -522,7 +526,7 @@ if [ $doit == 1 ]; then echo ${messages[$i]} done echo -e "$errormsg" - } | mail $reportemail -s "backupninja: $hostname $subject" + } | mail -s "backupninja: $hostname $subject" $reportemail fi if [ $actions_run != 0 ]; then