Add a check for csf testing mode (#399)

This commit is contained in:
(╯°□°)╯︵ uᴉǝssnH ɐɟɐʇsoW 2017-05-31 16:37:22 +03:00 committed by Michael Boelen
parent 1d78672b64
commit 360be2a700

View File

@ -313,6 +313,13 @@
FIREWALL_SOFTWARE="csf"
Report "firewall_software[]=csf"
Display --indent 2 --text "- Checking CSF status (configuration file)" --result "${STATUS_FOUND}" --color GREEN
LogText "Test: check if CSF testing mode is disabled"
FIND=$(${GREPBINARY} -P "^TESTING(\s|=)" ${FILE} | ${CUTBINARY} -d= -f2 | ${XARGSBINARY})
if [ "${FIND}" = "0" ]; then
Display --indent 4 --text "- Check if CSF testing mode is disabled" --result "${STATUS_OK}" --color GREEN
else
Display --indent 4 --text "- Check if CSF testing mode is disabled" --result "${STATUS_WARNING}" --color RED
fi
else
LogText "Result: ${FILE} does NOT exist"
fi