add result
This commit is contained in:
parent
35e916d510
commit
ac79956c88
1 changed files with 2 additions and 2 deletions
|
@ -245,11 +245,11 @@ if [ -n "${ntfy_server}" ]; then
|
||||||
# rm "${temp_file}"
|
# rm "${temp_file}"
|
||||||
else
|
else
|
||||||
ntfy_data="{ \"topic\": \"motion_detection\", \"message\": \"Event ${event_type} on host ${motion_host} camera ${camera_name}\"}"
|
ntfy_data="{ \"topic\": \"motion_detection\", \"message\": \"Event ${event_type} on host ${motion_host} camera ${camera_name}\"}"
|
||||||
curl -s "${ntfy_server}" -u "${ntfy_user}:${ntfy_password}" -d "${ntfy_data}"
|
result=$(curl -s "${ntfy_server}" -u "${ntfy_user}:${ntfy_password}" -d "${ntfy_data}")
|
||||||
return_code=$?
|
return_code=$?
|
||||||
fi
|
fi
|
||||||
if [ $return_code != 0 ]; then
|
if [ $return_code != 0 ]; then
|
||||||
message "Error ${return_code} publishing in ntfy server '${ntfy}'"
|
message "Error ${return_code} publishing in ntfy server '${ntfy}'. ${result}"
|
||||||
fi
|
fi
|
||||||
message "Data sent: ${ntfy_data}"
|
message "Data sent: ${ntfy_data}"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue