]> arthur.barton.de Git - backup-script.git/commitdiff
backup-script-wrapper: allow MAILTO to be set externally
authorAlexander Barton <alex@barton.de>
Thu, 24 Oct 2013 08:38:07 +0000 (10:38 +0200)
committerAlexander Barton <alex@barton.de>
Thu, 24 Oct 2013 08:38:07 +0000 (10:38 +0200)
bin/backup-script-wrapper

index 84b5b9229cd89afb35294b7e234ee6d09a2625c6..d069670bde80aa0dc253a37d8bc0b42618bcbdcd 100755 (executable)
@@ -10,7 +10,7 @@
 # Please read the file COPYING, README and AUTHORS for more information.
 #
 
-MAILTO="logcheck"
+[ -n "$MAILTO" ] || MAILTO="logcheck"
 
 NAME="backup-script"
 HOST=`hostname`
@@ -25,7 +25,6 @@ echo " - Host: `hostname -f`" >>$TMP
 echo " - User: `id -un`" >>$TMP
 echo >>$TMP
 
-
 `dirname "$0"`/backup-script $* >>$TMP 2>&1
 
 cat $TMP | mail -s "$HOST: $NAME results" "$MAILTO"