From ef54c952ce1a4ffe44a70184b93fe808e167022c Mon Sep 17 00:00:00 2001 From: "Antonio J. Delgado" Date: Mon, 20 Mar 2023 23:36:22 +0200 Subject: [PATCH] remove tmp file --- files/process_motion_event.sh | 1 + 1 file changed, 1 insertion(+) 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}"