[Piuparts-commits] [SCM] piatti.debian.org configuration files branch, master, updated. 148332ef45997ba3aaf38cc2c9a28441083bad49
Holger Levsen
holger at layer-acht.org
Fri Dec 23 10:24:52 UTC 2011
The following commit has been merged in the master branch:
commit de3613bb9bd2b5fc8412162e89a9499ca1ed32a0
Author: Holger Levsen <holger at layer-acht.org>
Date: Wed Dec 21 16:10:18 2011 +0100
only send mail if there is output
diff --git a/home/piupartsm/bin/generate_daily_report b/home/piupartsm/bin/generate_daily_report
index 8394628..6555b6a 100755
--- a/home/piupartsm/bin/generate_daily_report
+++ b/home/piupartsm/bin/generate_daily_report
@@ -54,9 +54,14 @@ fi
date > $LOCKFILE
# various scripts to detect issues and cleanup
+OUTPUT=$(mktemp)
for SCRIPT in detect_stale_mounts detect_tmp_cruft detect_piuparts_issues archive_old_logs ; do
- ~/bin/$SCRIPT 2>&1 | mail -s $SCRIPT $LOGNAME
+ ~/bin/$SCRIPT 2>&1 > $OUTPUT
+ if [ -s $OUTPUT ] ; then
+ cat $OUTPUT | mail -s $SCRIPT $LOGNAME
+ fi
done
+rm $OUTPUT
#
# piuparts-report starts here
--
piatti.debian.org configuration files
More information about the Piuparts-commits
mailing list