chore: add clear.sh tool for clearing retained messages in MQTT broker

pull/106/head
Jeff Culverhouse 3 months ago
parent 3d412f20f7
commit c16680bd04

1
.gitignore vendored

@ -27,7 +27,6 @@ npm-debug.log
NOTES
coverage/
dist/
tools/
# Apple
.DS_Store

@ -0,0 +1,9 @@
#!/bin/bash
mosquitto_sub -h mosquitto.graystorm.com -v -t '#' --retained-only \
| grep 'amcrest2mqtt' \
| while read -r topic payload ; do
mosquitto_pub -h mosquitto.graystorm.com -t "$topic" -n -r
echo "Purged $topic"
done
echo "done."
Loading…
Cancel
Save