diff --git a/icinga-cli.sh b/icinga-cli.sh index bd65875a8abc8f410318096193f0fcd651a894b4..c79648e4be3782822b5f52caa6cfea95eef00bbc 100755 --- a/icinga-cli.sh +++ b/icinga-cli.sh @@ -172,7 +172,6 @@ function processAllChecks(){ _log "" _log "------ looping over all checks" - getChecks for myconfig in $(getChecks) do iCounter=$iCounter+1 diff --git a/inc_functions.sh b/inc_functions.sh index 2b97b6927e6a86a11e1224cdab7fd1744538706c..8d3cee500a269eee5c8f6bcf6f275784416d9eb0 100644 --- a/inc_functions.sh +++ b/inc_functions.sh @@ -6,7 +6,7 @@ # ====================================================================== isInteractiveShell=false - test -n "$PS1" && isInteractiveShell=true + test $PPID -ne 1 && isInteractiveShell=true # .................................................................. # write debug output to STDERR @@ -248,12 +248,12 @@ function _getIpPrivate(){ http.makeRequest "$1" "$2" "$3" if http.isServerError >/dev/null; then - echo "CRITICAL ERROR: API request failed with a server error $1 $2" + _elog "CRITICAL ERROR: API request failed with a server error $1 $2" exit 1 fi - http.getResponseHeader - http.getResponse + _echo "$( http.getResponseHeader )" + _echo $( http.getResponse ) }