Fixed error message when there was nothing to report.

Mon, 20 Jan 2014 12:48:38 +0100

author
Michiel Broek <mbroek@mbse.eu>
date
Mon, 20 Jan 2014 12:48:38 +0100
changeset 19
2c0dacb26b14
parent 18
2b7620bf17e6
child 20
1d18ebb9e279

Fixed error message when there was nothing to report.

cron.daily/security file | annotate | diff | comparison | revisions
--- a/cron.daily/security	Wed Jan 15 12:43:54 2014 +0100
+++ b/cron.daily/security	Mon Jan 20 12:48:38 2014 +0100
@@ -22,7 +22,7 @@
 # Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
 #############################################################################
 
-VERSION=0.19
+VERSION=0.20
 export PATH=/bin:/usr/bin:/sbin:/usr/sbin
 umask 077
 LANG=C; export LANG
@@ -67,4 +67,7 @@
     fi
 done
 
-env MAILRC=/dev/null mail -s "$fqdn daily insecurity output for $date" $MAILTO < $SECOUT
+if [ -s "$SECOUT" ]; then
+    env MAILRC=/dev/null mail -s "$fqdn daily insecurity output for $date" $MAILTO < $SECOUT
+fi
+

mercurial