diff --git a/files/process_motion_event.sh b/files/process_motion_event.sh index 4b01368..933b87e 100644 --- a/files/process_motion_event.sh +++ b/files/process_motion_event.sh @@ -207,6 +207,7 @@ if [ -n "${file}" ]; then fi fi +ntfy_data="{ ${data}, \"topic\": \"motion_detection\" }" data="{${data}}" if [ "${signal_alert}" == "true" ]; then message "Sending to Signal destination '${signal_destination}'..." @@ -230,7 +231,6 @@ fi if [ -n "${ntfy_server}" ]; then ntfy_password="$(cat "${ntfy_password_file}")" - ntfy_data="${data}, \"topic\": \"motion_detection\"" message "Sending event to ntfy server '${ntfy_server}/motion_detection' ..." message "Data: ${ntfy_data}" curl -s "${ntfy_server}" -d "${ntfy_data}"