add result

This commit is contained in:
Antonio J. Delgado 2023-03-21 00:46:02 +02:00
parent 35e916d510
commit ac79956c88

View file

@ -245,11 +245,11 @@ if [ -n "${ntfy_server}" ]; then
# 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}"
result=$(curl -s "${ntfy_server}" -u "${ntfy_user}:${ntfy_password}" -d "${ntfy_data}")
return_code=$?
fi
if [ $return_code != 0 ]; then
message "Error ${return_code} publishing in ntfy server '${ntfy}'"
message "Error ${return_code} publishing in ntfy server '${ntfy}'. ${result}"
fi
message "Data sent: ${ntfy_data}"
fi