X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=nagcollect.git;a=blobdiff_plain;f=client%2Fbin%2Fnagcollect;h=bd884c9a302523a758a2dd7e97bd8e7e5f9e2300;hp=71180a11718748a2b3e00a5c9af1b70dcb02976c;hb=1db2414a5f27bf29b8870e01524eba6aa260d622;hpb=6d47f0ea45dd85a336c88728094c19292c866c0d;ds=sidebyside diff --git a/client/bin/nagcollect b/client/bin/nagcollect index 71180a1..bd884c9 100755 --- a/client/bin/nagcollect +++ b/client/bin/nagcollect @@ -58,15 +58,15 @@ function submitService() [ -r "/usr/local/etc/nagcollect.conf" ] && . /usr/local/etc/nagcollect.conf [ -r "/etc/nagcollect.conf" ] && . /etc/nagcollect.conf -[ -n "$SERVER_URL" -a -n "$CLIENT_KEY" -a -n "$CLIENT_ID" ] || \ - Error "Configuration invalid, check SERVER_URL, CLIENT_KEY and CLIENT_ID variables!" - -if [ "$AUTOUPDATE" = 1 ]; then +if [ -n "$SERVER_URL" -a "$AUTOUPDATE" = 1 ]; then Msg "Updating local test scripts:" refreshTestScripts || \ Error "Failed to refresh test scripts from \"$SERVER_URL\" ($?)!" fi +[ -n "$SERVER_URL" -a -n "$CLIENT_KEY" -a -n "$CLIENT_ID" ] || \ + Error "Can't continue, configuration invalid: check SERVER_URL, CLIENT_KEY and CLIENT_ID variables!" + Msg "Running test scripts:" ls -1 \