From a6572bd4bba1695d5d002fc9ec683300048803f7 Mon Sep 17 00:00:00 2001 From: kx1t <15090643+kx1t@users.noreply.github.com> Date: Mon, 9 Dec 2024 12:02:49 +0100 Subject: [PATCH] Bug fix --- rootfs/usr/share/plane-alert/plane-alert.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rootfs/usr/share/plane-alert/plane-alert.sh b/rootfs/usr/share/plane-alert/plane-alert.sh index 1de2fd4..f2ecccd 100755 --- a/rootfs/usr/share/plane-alert/plane-alert.sh +++ b/rootfs/usr/share/plane-alert/plane-alert.sh @@ -419,7 +419,7 @@ then done # convert $msg_array[@] into a JSON object: - MQTT_JSON="$(for i in "${!msg_array[@]}"; do printf "{\'%s\':\'%s\'}\n" "$i" "${msg_array[$i]}"; done | jq -sc add)" + MQTT_JSON="$(for i in "${!msg_array[@]}"; do printf '{"%s":"%s"}\n' "$i" "${msg_array[$i]}"; done | jq -sc add)" # prep the MQTT host, port, etc unset MQTT_TOPIC MQTT_PORT MQTT_USERNAME MQTT_PASSWORD MQTT_HOST