diff options
author | Sam Chudnick <sam@chudnick.com> | 2022-05-21 14:34:30 -0400 |
---|---|---|
committer | Sam Chudnick <sam@chudnick.com> | 2022-05-21 14:34:30 -0400 |
commit | 9a14ebe66f7c443ca24474a6242151b5f4fac06b (patch) | |
tree | 6ba528ea6d988fff8ead0d4eec53b720ca851e5e /monitoring | |
parent | 37a376466c6fdc42bd7b8b86241d1fc1ce15389b (diff) |
Don't quit on non-zero return status from curl.
Diffstat (limited to 'monitoring')
-rwxr-xr-x | monitoring/icinga-agent | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/monitoring/icinga-agent b/monitoring/icinga-agent index e4690fe..6b8e853 100755 --- a/monitoring/icinga-agent +++ b/monitoring/icinga-agent | |||
@@ -58,10 +58,10 @@ proto="http" | |||
58 | base="$proto://$master_fqdn/icingaweb2/director/self-service/register-host" | 58 | base="$proto://$master_fqdn/icingaweb2/director/self-service/register-host" |
59 | url="$base?name=$nodename&key=$apikey" | 59 | url="$base?name=$nodename&key=$apikey" |
60 | result=$(curl -m 30 -i $url -H "Accept: application/json" -X "POST" \ | 60 | result=$(curl -m 30 -i $url -H "Accept: application/json" -X "POST" \ |
61 | -d "{\"display_name\":\"$displayname\",\"address\":\"$ipv4\",\"address6\":\"$ipv6\"}" \ | 61 | -d "{\"display_name\":\"$displayname\",\"address\":\"$ipv4\",\"address6\":\"$ipv6\"}") |
62 | || error "unable to register with master") | 62 | #\|| error "unable to register with master") |
63 | 63 | ||
64 | echo $result | grep -q "error" && error "unable to register with master" | 64 | #echo $result | grep -q "error" && error "unable to register with master" |
65 | 65 | ||
66 | 66 | ||
67 | # Initialize PKI with master | 67 | # Initialize PKI with master |