aboutsummaryrefslogtreecommitdiffstats
path: root/cron-sh
diff options
context:
space:
mode:
authorFrederic Lepied <flepied@mandriva.com>2002-01-21 04:11:27 +0000
committerFrederic Lepied <flepied@mandriva.com>2002-01-21 04:11:27 +0000
commitdfacdf605e9439077b92e2a8827fce618240fd40 (patch)
treefb3af867c3e5a0c8e9857d7adab599b1d33fb8be /cron-sh
parent43595bc63dbeb77a39466e2665e4df9e8b9a3b96 (diff)
downloadmsec-dfacdf605e9439077b92e2a8827fce618240fd40.tar
msec-dfacdf605e9439077b92e2a8827fce618240fd40.tar.gz
msec-dfacdf605e9439077b92e2a8827fce618240fd40.tar.bz2
msec-dfacdf605e9439077b92e2a8827fce618240fd40.tar.xz
msec-dfacdf605e9439077b92e2a8827fce618240fd40.zip
mail even when the log is empty to signify that the check is fine.
Diffstat (limited to 'cron-sh')
-rwxr-xr-xcron-sh/diff_check.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/cron-sh/diff_check.sh b/cron-sh/diff_check.sh
index f93c754..21fd883 100755
--- a/cron-sh/diff_check.sh
+++ b/cron-sh/diff_check.sh
@@ -177,9 +177,14 @@ if [[ -s ${TMP} ]]; then
echo -e "\n\n*** Diff Check, ${date} ***\n" >> ${SECURITY_LOG}
cat ${TMP} >> ${SECURITY_LOG}
- Maillog "*** Diff Check on ${hostname}, ${date} ***" "${TMP}"
+else
+ cat > ${TMP} <<EOF
+Nothing has changed since the last run.
+EOF
fi
+Maillog "*** Diff Check on ${hostname}, ${date} ***" "${TMP}"
+
if [[ -f ${TMP} ]]; then
rm -f ${TMP}
fi