changed topic and also added the -q 0 flag to mosquitto_sub

This commit is contained in:
2026-02-27 19:45:19 -06:00
parent 1b22987e87
commit d14df72f5e
3 changed files with 4 additions and 4 deletions

View File

@@ -6,9 +6,9 @@
touch "$LOG_FILE"
mosquitto_pub -h 127.0.0.1 -p 1883 -t "$TOPIC" "SaveLogStart=1"
mosquitto_sub -h 127.0.0.1 -p 1883 -t "$TOPIC" | while IFS="=" read -r key value
mosquitto_sub -h 127.0.0.1 -p 1883 -q 0 -t "$TOPIC" | while IFS="=" read -r key value
do
case "$key" in
"SaveLog") printf "%s\n" "$value" >> "$LOG_FILE" ;;
"SaveLog") printf "%s\n" "$value" >>"$LOG_FILE" ;;
esac
done