From 1a1dd358ce967c606e35062264e2989cb615d1c6 Mon Sep 17 00:00:00 2001 From: Eugeni Dodonov Date: Wed, 9 Sep 2009 00:03:11 +0000 Subject: properly format security header. --- cron-sh/security.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'cron-sh') 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 -- cgit v1.2.1