Only show specific status of services when using --verbose

This commit is contained in:
mboelen 2016-04-19 21:09:27 +02:00
parent 5996dcdc95
commit b1403aac20

View File

@ -49,7 +49,7 @@
FIND=`awk '/^domain/ { print $2 }' /etc/resolv.conf` FIND=`awk '/^domain/ { print $2 }' /etc/resolv.conf`
if [ "${FIND}" = "" ]; then if [ "${FIND}" = "" ]; then
LogText "Result: no default domain found" LogText "Result: no default domain found"
Display --indent 2 --text "- Checking default DNS search domain" --result NONE --color WHITE if IsVerbose; then Display --indent 2 --text "- Checking default DNS search domain" --result NONE --color WHITE; fi
else else
LogText "Result: found default domain" LogText "Result: found default domain"
LogText "Output: ${FIND}" LogText "Output: ${FIND}"
@ -118,7 +118,7 @@
FIND=`grep "^options" /etc/resolv.conf | awk '{ print $2 }'` FIND=`grep "^options" /etc/resolv.conf | awk '{ print $2 }'`
if [ "${FIND}" = "" ]; then if [ "${FIND}" = "" ]; then
LogText "Result: no specific other options configured in /etc/resolv.conf" LogText "Result: no specific other options configured in /etc/resolv.conf"
Display --indent 2 --text "- Checking /etc/resolv.conf options" --result "NONE" --color WHITE if IsVerbose; then Display --indent 2 --text "- Checking /etc/resolv.conf options" --result "NONE" --color WHITE; fi
else else
for I in ${FIND}; do for I in ${FIND}; do
LogText "Found option: ${I}" LogText "Found option: ${I}"
@ -238,7 +238,7 @@
Display --indent 2 --text "- Checking nscd status" --result RUNNING --color GREEN Display --indent 2 --text "- Checking nscd status" --result RUNNING --color GREEN
else else
LogText "Result: nscd is not running" LogText "Result: nscd is not running"
Display --indent 2 --text "- Checking nscd status" --result "NOT FOUND" --color WHITE if IsVerbose; then Display --indent 2 --text "- Checking nscd status" --result "NOT FOUND" --color WHITE; fi
fi fi
fi fi
# #
@ -257,7 +257,7 @@
Display --indent 2 --text "- Checking Unbound status" --result RUNNING --color GREEN Display --indent 2 --text "- Checking Unbound status" --result RUNNING --color GREEN
else else
LogText "Result: Unbound daemon is not running" LogText "Result: Unbound daemon is not running"
Display --indent 2 --text "- Checking Unbound status" --result "NOT FOUND" --color WHITE if IsVerbose; then Display --indent 2 --text "- Checking Unbound status" --result "NOT FOUND" --color WHITE; fi
fi fi
fi fi
# #
@ -301,7 +301,7 @@
BIND_RUNNING=1 BIND_RUNNING=1
else else
LogText "Result: BIND not running" LogText "Result: BIND not running"
Display --indent 2 --text "- Checking BIND status" --result "NOT FOUND" --color WHITE if IsVerbose; then Display --indent 2 --text "- Checking BIND status" --result "NOT FOUND" --color WHITE; fi
fi fi
fi fi
# #
@ -414,7 +414,7 @@
POWERDNS_RUNNING=1 POWERDNS_RUNNING=1
else else
LogText "Result: PowerDNS not running" LogText "Result: PowerDNS not running"
Display --indent 2 --text "- Checking PowerDNS status" --result "NOT FOUND" --color WHITE if IsVerbose; then Display --indent 2 --text "- Checking PowerDNS status" --result "NOT FOUND" --color WHITE; fi
fi fi
fi fi
# #
@ -518,7 +518,7 @@
fi fi
else else
LogText "Result: ypbind is not active" LogText "Result: ypbind is not active"
Display --indent 2 --text "- Checking ypbind status" --result "NOT FOUND" --color WHITE if IsVerbose; then Display --indent 2 --text "- Checking ypbind status" --result "NOT FOUND" --color WHITE; fi
fi fi
fi fi
# #