diff --git a/files/process_motion_event.sh b/files/process_motion_event.sh index 14d8fd1..a5fb288 100644 --- a/files/process_motion_event.sh +++ b/files/process_motion_event.sh @@ -245,11 +245,11 @@ if [ -n "${ntfy_server}" ]; then # rm "${temp_file}" else 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=$? fi 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 message "Data sent: ${ntfy_data}" fi