diff options
author | Frederic Lepied <flepied@mandriva.com> | 2002-01-21 04:11:27 +0000 |
---|---|---|
committer | Frederic Lepied <flepied@mandriva.com> | 2002-01-21 04:11:27 +0000 |
commit | dfacdf605e9439077b92e2a8827fce618240fd40 (patch) | |
tree | fb3af867c3e5a0c8e9857d7adab599b1d33fb8be | |
parent | 43595bc63dbeb77a39466e2665e4df9e8b9a3b96 (diff) | |
download | msec-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.
-rwxr-xr-x | cron-sh/diff_check.sh | 7 |
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 |