From: Alexander Barton Date: Wed, 22 Aug 2012 13:59:02 +0000 (+0200) Subject: nagcollect: do auto-update even when not configured completely X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=nagcollect.git;a=commitdiff_plain;h=1db2414a5f27bf29b8870e01524eba6aa260d622 nagcollect: do auto-update even when not configured completely --- 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 \