diff --git a/wled b/wled index 7c1d178..f9d53b3 100755 --- a/wled +++ b/wled @@ -52,6 +52,12 @@ case "$2" in ;; esac +curl_exit=$? +if test $curl_exit -ne 0; then + echo "Error: curl exited with exit code $curl_exit." + exit 1 +fi + # Check API responce. Should be {"success":true}. if test "$(echo -n "$api_resp"|tr -c -d '[:alpha:]')" != 'successtrue'; then echo "Error: unexpected responce from WLED API." >&2