Mail default is now just root. Don't send empty mail reports anymore.

Wed, 15 Jan 2014 12:43:54 +0100

author
Michiel Broek <mbroek@mbse.eu>
date
Wed, 15 Jan 2014 12:43:54 +0100
changeset 18
2b7620bf17e6
parent 17
65656789da08
child 19
2c0dacb26b14

Mail default is now just root. Don't send empty mail reports anymore.

cron.daily/security file | annotate | diff | comparison | revisions
--- a/cron.daily/security	Wed May 22 13:46:49 2013 +0200
+++ b/cron.daily/security	Wed Jan 15 12:43:54 2014 +0100
@@ -1,7 +1,7 @@
 #!/bin/bash
 #
 #############################################################################
-# Copyright (C) 2005-2013
+# Copyright (C) 2005-2014
 #   
 # Michiel Broek               <mbse at mbse.eu>
 #
@@ -22,7 +22,7 @@
 # Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
 #############################################################################
 
-VERSION=0.18
+VERSION=0.19
 export PATH=/bin:/usr/bin:/sbin:/usr/sbin
 umask 077
 LANG=C; export LANG
@@ -31,7 +31,7 @@
 date=`date`
 
 if [ "${MAILTO}" = "" ]; then
-    MAILTO=root@$fqdn
+    MAILTO=root
 fi
 
 DAILYDIR=`mktemp -d /tmp/_daily.XXXXXX` || exit 1
@@ -67,9 +67,4 @@
     fi
 done
 
-
-if [ ! -s "$SECOUT" ]; then
-    echo "Nothing to report on $date" > $SECOUT
-fi
 env MAILRC=/dev/null mail -s "$fqdn daily insecurity output for $date" $MAILTO < $SECOUT
-

mercurial