]> arthur.barton.de Git - nagcollect.git/commitdiff
Enhance output of "nagcollecttest" script
authorAlexander Barton <alex@barton.de>
Fri, 10 Aug 2012 08:52:19 +0000 (10:52 +0200)
committerAlexander Barton <alex@barton.de>
Fri, 10 Aug 2012 08:52:19 +0000 (10:52 +0200)
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

index e31644fccd4a56b09124bb3af7b79658032fe467..4bcba08f81923d29c0e145d12ac5a1e834516153 100755 (executable)
@@ -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-