diff options
author | Michael Boelen <michael.boelen@cisofy.com> | 2016-05-03 15:57:53 +0300 |
---|---|---|
committer | Michael Boelen <michael.boelen@cisofy.com> | 2016-05-03 15:57:53 +0300 |
commit | eded02cfde6a48270b975d8390dac44b3ad22f35 (patch) | |
tree | f5aa20ddaade51615a4777a3642aadf2e4e546f7 /include/tests_webservers | |
parent | eda79af419d4d61ab6cc078d0c8f74bb8c031b98 (diff) |
Rewritten counters and dealing with values
Diffstat (limited to 'include/tests_webservers')
-rw-r--r-- | include/tests_webservers | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/include/tests_webservers b/include/tests_webservers index 6b2105fc..6c16319d 100644 --- a/include/tests_webservers +++ b/include/tests_webservers @@ -150,14 +150,14 @@ for J in `grep "ServerName" ${I} | grep -v "^#" | awk '{ if ($1=="ServerName" && $2!="*" && $2!="default") print $2 }'`; do if [ ! -z ${J} ]; then tVHOSTS="${tVHOSTS} ${J}" - cVHOSTS=`expr ${cVHOSTS} + 1` + cVHOSTS=$((cVHOSTS + 1)) fi done # Search Server aliases for J in `grep "ServerAlias" ${I} | grep -v "^#" | sed "s/.* ServerAlias//g" | sed "s/#.*//g"`; do if [ ! -z ${J} ]; then tVHOSTS="${tVHOSTS} ${J}" - cVHOSTS=`expr ${cVHOSTS} + 1` + cVHOSTS=$((cVHOSTS + 1)) fi done else @@ -275,7 +275,7 @@ for J in ${FIND}; do Report "apache_module[]=${J}" LogText "Result: found Apache module ${J}" - N=`expr ${N} + 1` + N=$((N + 1)) done fi done @@ -431,7 +431,7 @@ for J in ${FIND2}; do # Ensure that we are parsing normal files if [ -f ${J} ]; then - N=`expr ${N} + 1` + N=$((N + 1)) LogText "Result: found Nginx configuration file ${J}" Report "nginx_sub_conf_file=${J}" FileIsReadable ${J} @@ -621,7 +621,7 @@ # FIND=`grep "proxy_pass" ${NGINX_CONF_LOCATION} | grep -v "#" | sed 's/proxy_pass//g' | tr -d ';'` # for I in ${FIND}; do # LogText "Found reverse proxy configuration for: ${I}" -# N=`expr ${N} + 1` +# N=$((N + 1)) # done # if [ ${N} -eq 0 ]; then # LogText "Result: no reverse proxying functionality found" @@ -647,7 +647,7 @@ # if [ "${I}" = "_" ]; then I="Default virtual host"; fi # LogText "Found virtual host: ${I}" # Report "nginx_vhost_name[]=${I}" -# N=`expr ${N} + 1` +# N=$((N + 1)) # done # if [ ${N} -eq 0 ]; then # LogText "Result: no virtual hosts found" |