ragps/gps_json_to_mqtt.sh

7 lines
153 B
Bash
Executable File

while read mess; do
outjson=$(echo $mess|./gps_pre.jq)
if [ -n "$outjson" ]; then
mosquitto_pub -h mqtt -t "gps/$(hostname)" -m $outjson
fi
done