Skip to content

Commit

Permalink
wb-watch-update: republish retained messages on reconnect to mqtt bro…
Browse files Browse the repository at this point in the history
…ker (#161)
  • Loading branch information
sikmir authored Sep 26, 2024
1 parent 31ef4b0 commit 6f01f44
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
6 changes: 6 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
wb-utils (4.23.1) stable; urgency=medium

* wb-watch-update: republish retained messages on reconnect to mqtt broker

-- Nikolay Korotkiy <[email protected]> Wed, 25 Sep 2024 17:30:00 +0400

wb-utils (4.23.0) stable; urgency=medium

* wb-prepare: run scripts from /etc/wb-prepare.d on firstboot
Expand Down
7 changes: 7 additions & 0 deletions utils/bin/wb-watch-update
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,13 @@ chown www-data:www-data "$SINGLE_WATCH_DIR"

LAST_FIT=''

mosquitto_sub -t '$SYS/broker/uptime' | while read -r message; do
if [[ "$message" == "0 seconds" ]]; then
publish_factoryreset_fits_info
mqtt_status "IDLE"
fi
done &

(
echo "$BASHPID" > "$PID_FILE"
2>/dev/null exec inotifywait -m -r \
Expand Down

0 comments on commit 6f01f44

Please sign in to comment.