diff options
author | (╯°□°)╯︵ uᴉǝssnH ɐɟɐʇsoW <mostafahussein@users.noreply.github.com> | 2017-05-31 16:37:22 +0300 |
---|---|---|
committer | Michael Boelen <michael.boelen@cisofy.com> | 2017-05-31 16:37:22 +0300 |
commit | 360be2a700166576ab7971bb0cbe3337a7f1a5cb (patch) | |
tree | 48d39ab4230bf41a4d7397e267465cc11d5c85dd /include/tests_firewalls | |
parent | 1d78672b64cd117d11d0d32b3d282b21cc330630 (diff) |
Add a check for csf testing mode (#399)
Diffstat (limited to 'include/tests_firewalls')
-rw-r--r-- | include/tests_firewalls | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/tests_firewalls b/include/tests_firewalls index fd6338a2..56897b59 100644 --- a/include/tests_firewalls +++ b/include/tests_firewalls @@ -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 |