From d4f0ca11d8410517c49670082588c51648763f1b Mon Sep 17 00:00:00 2001 From: Alexander Barton Date: Fri, 10 Aug 2012 10:52:19 +0200 Subject: [PATCH] Enhance output of "nagcollecttest" script Now it displays "NO result" when the test script didn't produce any output and the nagcollect client wouldn't send anything to the server. --- client/bin/nagcollecttest | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/client/bin/nagcollecttest b/client/bin/nagcollecttest index e31644f..4bcba08 100755 --- a/client/bin/nagcollecttest +++ b/client/bin/nagcollecttest @@ -34,6 +34,9 @@ fi SERVICE=""; STATUS=""; TEXT="" echo "Checking \"$tst\" ..." . "$tst" -echo "RESULT: $SERVICE=$STATUS \"$TEXT\"" + +[ -n "$STATUS" -o -n "$TEXT" ] \ + && echo "RESULT: $SERVICE=$STATUS \"$TEXT\"" \ + || echo "NO result ..." # -eof- -- 2.39.2