projects
/
rtl433-sensors
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
quiet
[rtl433-sensors]
/
mqtt-stat-pgsql.sh
1
#!/bin/sh -e
2
3
mosquitto_sub -h 10.13.37.5 -t 'stat/#' -v | while read topic value ; do
4
topic=`echo $topic | sed 's/^stat\///'`
5
psql --quiet -c "insert into stat (topic,value) values ('$topic','$value')" rot13
6
done