claiming: exit 0 when daemon not running and the claim was successful (#11195)
Ilya Mashchenko committed
May 31, 2021 at 14:34 UTC
5bce2d9a8196a90e9d3972b90934d79bad4bb8e1
1 file changed
+1
-1
claim/netdata-claim.sh.in
+1
-1
@@ -418,7 +418,7 @@ HERE_DOC
418
exit $EXIT_CODE
419
fi
420
echo >&2 "${PROXYMSG}The claim was successful but the agent could not be notified ($?)- it requires a restart to connect to the cloud."
421
- exit 5
421
+ [ "$NETDATA_RUNNING" -eq 0 ] && exit 0 || exit 5
422
fi
423
424
echo >&2 "Failed to claim node with the following error message:\"${ERROR_MESSAGES[$EXIT_CODE]}\""