aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xcron-sh/security.sh12
1 files changed, 7 insertions, 5 deletions
diff --git a/cron-sh/security.sh b/cron-sh/security.sh
index 09f9286..e810603 100755
--- a/cron-sh/security.sh
+++ b/cron-sh/security.sh
@@ -77,13 +77,15 @@ if [[ -s ${SECURITY} ]]; then
Syslog ${SECURITY}
Ttylog ${SECURITY}
- echo "$SECURITY_PREFIX *** Security Check, ${REPORT_DATE} ***" >> ${SECURITY_LOG}
- printf "Report summary:\n" >> ${SECURITY_LOG}
+ echo "*** Security Check, ${REPORT_DATE} ***" > ${MSEC_TMP}
+ printf "Report summary:\n" >> ${MSEC_TMP}
+ cat ${INFOS} >> ${MSEC_TMP}
+ printf "\nDetailed report:\n" >> ${MSEC_TMP}
+ cat ${SECURITY} >> ${MSEC_TMP}
+
cat ${INFOS} | sed -e "s/^/$INFO_PREFIX/g" >> ${SECURITY_LOG}
- printf "\nDetailed report:\n" >> ${SECURITY_LOG}
- cat ${SECURITY} | sed -e "s/^/$SECURITY_PREFIX/g" >> ${SECURITY_LOG}
- Maillog "[msec] *** Security Check on ${REPORT_HOSTNAME}, ${REPORT_DATE} ***" "${SECURITY} ${INFOS}"
+ Maillog "[msec] *** Security Check on ${REPORT_HOSTNAME}, ${REPORT_DATE} ***" "${MSEC_TMP}"
Notifylog "MSEC has performed Security Check on ${REPORT_HOSTNAME} on ${REPORT_DATE}"
fi