From 52aaaa0a2b1181421af732767157d063ae7be9ca Mon Sep 17 00:00:00 2001 From: "Antonio J. Delgado" Date: Mon, 20 Mar 2023 22:41:42 +0200 Subject: [PATCH] fix json --- files/process_motion_event.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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}"