forked from freifunk-franken/firmware
8 lines
307 B
Bash
8 lines
307 B
Bash
#!/bin/sh
|
|
MACADDR=$(/bin/sed 's/://g' < /sys/class/net/br-client/address)
|
|
SCRIPT_DATA_FILE=$(uci get nodewatcher.@script[0].data_file).json
|
|
|
|
if [ -n "$(uci -q get fff.mqtt.server)" ] ; then
|
|
mosquitto_pub -h "$(uci get fff.mqtt.server)" -p 1883 -t /monitoring/v2/"$MACADDR" -f "$SCRIPT_DATA_FILE"
|
|
fi
|