diff --git a/files/process_motion_event.sh b/files/process_motion_event.sh index 08366fc..cc18cd4 100644 --- a/files/process_motion_event.sh +++ b/files/process_motion_event.sh @@ -243,6 +243,7 @@ if [ -n "${ntfy_server}" ]; then ntfy_data="{ \"topic\": \"motion_detection\", \"message\": \"Event ${event_type} on host ${motion_host} camera ${camera_name}\", \"filename\": \"${temp_file}\" }" curl -s "${ntfy_server}" -T "${temp_file}" -u "${ntfy_user}:${ntfy_password}" -d "${ntfy_data}" return_code=$? + 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}"