From c68ef3836a462e065c1338ca928d307463633e13 Mon Sep 17 00:00:00 2001 From: "Stefano (mprenditore) Stella" Date: Thu, 14 Jul 2016 10:59:09 +0200 Subject: [PATCH] fixed ping response if fetching the status page return a error status code --- zapache | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/zapache b/zapache index cd4a31f..8a80ea3 100755 --- a/zapache +++ b/zapache @@ -101,7 +101,11 @@ if [ "$cache" -ot "$cache_timestamp_check" ]; then fetch_url "$STATUS_URL" > "$cache" rval=$? if [ $rval != 0 ]; then - echo "ZBX_NOTSUPPORTED" + if [ "$CASE_VALUE" == "ping" ]; then + echo "0" + else + echo "ZBX_NOTSUPPORTED" + fi exit 1 fi fi