From ac79956c883b34cc1ca7b300bd06fe572d026a7b Mon Sep 17 00:00:00 2001 From: "Antonio J. Delgado" Date: Tue, 21 Mar 2023 00:46:02 +0200 Subject: [PATCH] add result --- files/process_motion_event.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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