diff options
author | mboelen <michael@cisofy.com> | 2014-09-15 14:01:09 +0400 |
---|---|---|
committer | mboelen <michael@cisofy.com> | 2014-09-15 14:01:09 +0400 |
commit | c9fde8c2d11744cc0875bc3e5dd0abf096211755 (patch) | |
tree | 0997d08919db7ec4e2aa9065c3e9aaf1671c4d6f /include/tests_webservers | |
parent | 35d32fb5e40b86632677fd2256aebeddf926394a (diff) |
Code cleanup and small enhancements
Diffstat (limited to 'include/tests_webservers')
-rw-r--r-- | include/tests_webservers | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/include/tests_webservers b/include/tests_webservers index e6f00154..0e05786c 100644 --- a/include/tests_webservers +++ b/include/tests_webservers @@ -56,7 +56,7 @@ if [ "${HTTPDBINARY}" = "" ]; then Display --indent 2 --text "- Checking Apache" --result "NOT FOUND" --color WHITE else - logtext "Test: Scanning for Apache binary..." + logtext "Test: Scanning for Apache binary" IS_APACHE=`${HTTPDBINARY} -v | egrep '[aA]pache'` if [ "${IS_APACHE}" = "" ]; then logtext "Result: ${HTTPDBINARY} is not Apache" @@ -121,7 +121,7 @@ if [ ${APACHE_INSTALLED} -eq 1 ]; then PREQS_MET="YES"; else PREQS_MET="NO"; fi Register --test-no HTTP-6626 --preqs-met ${PREQS_MET} --weight L --network NO --description "Testing other Apache configuration file" if [ ${SKIPTEST} -eq 0 ]; then - #Display --indent 4 --text "- Searching Apache virtual hosts..." + #Display --indent 4 --text "- Searching Apache virtual hosts" for I in ${sTEST_APACHE_TARGETS}; do if [ -d ${I} ]; then find ${I} -name "*.conf" -print >> ${TMPFILE2} @@ -200,7 +200,7 @@ # # Check if option ServerTokens is configured # SERVERTOKENSTEST=`cat ${APACHE_CONFIGFILE} | grep ServerTokens | grep -v '^#'` # if [ ! "${SERVERTOKENSTEST}" = "" ]; then -# Display --indent 4 --text "- Checking option ServerTokens..." --result FOUND --color WHITE +# Display --indent 4 --text "- Checking option ServerTokens" --result FOUND --color WHITE # SERVERTOKENSTEST=`echo ${SERVERTOKENSTEST} | sed 's/ServerTokens//' | tr -d ' '` # logtext "Option ServerTokens found: ${SERVERTOKENSTEST}" # SERVERTOKENSEXPECTED=`cat ${PROFILE} | grep 'apache' | grep 'ServerTokens' | cut -d ':' -f3` @@ -213,7 +213,7 @@ # logtext "Expected: ${SERVERTOKENSEXPECTED}" # fi # else -# Display --indent 4 --text "- Checking option ServerTokens..." --result "NOT FOUND" --color WHITE +# Display --indent 4 --text "- Checking option ServerTokens" --result "NOT FOUND" --color WHITE # fi # # else @@ -224,9 +224,9 @@ # # # Display results from checks # if [ ${SERVERTOKENSFOUND} -eq 1 ]; then -# Display --indent 6 --text "- Value of ServerTokens..." --result OK --color GREEN +# Display --indent 6 --text "- Value of ServerTokens" --result OK --color GREEN # else -# Display --indent 6 --text "- Value of ServerTokens..." --result WARNING --color RED +# Display --indent 6 --text "- Value of ServerTokens" --result WARNING --color RED # ReportWarning ${TEST_NO} "M" "Value of 'ServerTokens' in Apache config is different than template" # fi # fi @@ -467,7 +467,7 @@ Register --test-no HTTP-6708 --preqs-met ${PREQS_MET} --weight L --network NO --description "Check discovered nginx configuration settings" if [ ${SKIPTEST} -eq 0 ]; then logtext "Test: start parsing all discovered nginx options" - Display --indent 4 --text "- Parsing configuration options..." + Display --indent 4 --text "- Parsing configuration options" ParseNginx fi # @@ -527,7 +527,7 @@ Register --test-no HTTP-6712 --preqs-met ${PREQS_MET} --weight L --network NO --description "Check nginx access logging" if [ ${SKIPTEST} -eq 0 ]; then NGINX_LOG_SUGGESTION=0 - Display --indent 6 --text "- Checking log file configuration..." + Display --indent 6 --text "- Checking log file configuration" # Check for missing access log if [ ${NGINX_ACCESS_LOG_MISSING} -eq 1 ]; then @@ -616,10 +616,10 @@ # done # if [ ${N} -eq 0 ]; then # logtext "Result: no reverse proxying functionality found" -# Display --indent 4 --text "- Searching reverse proxy functionality..." --result "NOT FOUND" --color WHITE +# Display --indent 4 --text "- Searching reverse proxy functionality" --result "NOT FOUND" --color WHITE # else # logtext "Result: found ${N} addresses for which nginx will be a reverse proxy" -# Display --indent 4 --text "- Searching reverse proxy functionality..." --result "${N} FOUND" --color GREEN +# Display --indent 4 --text "- Searching reverse proxy functionality" --result "${N} FOUND" --color GREEN # fi # fi # @@ -642,10 +642,10 @@ # done # if [ ${N} -eq 0 ]; then # logtext "Result: no virtual hosts found" -# Display --indent 4 --text "- Searching virtual hosts..." --result "NOT FOUND" --color WHITE +# Display --indent 4 --text "- Searching virtual hosts" --result "NOT FOUND" --color WHITE # else # logtext "Result: found ${N} virtual hosts" -# Display --indent 4 --text "- Searching virtual hosts..." --result "${N} FOUND" --color GREEN +# Display --indent 4 --text "- Searching virtual hosts" --result "${N} FOUND" --color GREEN # fi # fi # |