Fixed disabled features, headers and preparing main script

This commit is contained in:
thibault.dewailly
2016-04-17 23:19:41 +02:00
parent fa98efc32b
commit 628fe96666
5 changed files with 14 additions and 6 deletions

View File

@ -27,7 +27,7 @@ while [[ $# > 0 ]]; do
ARG="$1"
case $ARG in
--audit)
if [ $status != 'disabled' -o $status != 'false' ]; then
if [ $status != 'disabled' -a $status != 'false' ]; then
debug "Audit argument detected, setting status to audit"
status=audit
else
@ -58,17 +58,17 @@ case $status in
;;
disabled | false )
info "$SCRIPT_NAME is disabled, ignoring"
exit 2 # Means unknown status
;;
*)
warn "Wrong value for status : $status. Must be [ enabled | true | audit | disabled | false ]"
;;
esac
info "Results : "
if [ $CRITICAL_ERRORS_NUMBER = 0 ]; then
ok "Check Passed"
exit 0
exit 0 # Means ok status
else
crit "Check Failed"
exit 1
exit 1 # Means critical status
fi