fix filename

This commit is contained in:
Antonio J. Delgado 2023-03-21 00:38:25 +02:00
parent b684813054
commit 677f9a8bcd

View file

@ -239,8 +239,8 @@ if [ -n "${ntfy_server}" ]; then
if [ ${return_code} != 0 ]; then
message "Error ${return_code} processing video file '${file}'. ${result}"
fi
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}"
ntfy_data="{ \"topic\": \"motion_detection\", \"message\": \"Event ${event_type} on host ${motion_host} camera ${camera_name}\", \"filename\": \"$(basename ${file})\" }"
curl -s "${ntfy_server}" -T "${temp_file}" -H "Filename: $(basename "${file}")"-u "${ntfy_user}:${ntfy_password}" -d "${ntfy_data}"
return_code=$?
# rm "${temp_file}"
else