Restored second cronjob

master
Dennis Eisold 11 months ago
parent b75041997b
commit 4721f2086e

@ -0,0 +1 @@
*/5 * * * * sleep $(/usr/bin/random 70 85); /usr/sbin/json-mqtt-proxy

@ -1,7 +1,7 @@
#!/bin/sh
MACADDR=$(cat /sys/class/net/br-client/address | /bin/sed 's/://g')
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
mosquitto_pub -h "$(uci get fff.mqtt.server)" -p 1883 -t /monitoring/v2/"$MACADDR" -f "$SCRIPT_DATA_FILE"
fi

@ -42,6 +42,4 @@ LANG=C
debug "Generate actual status data"
crawl
/usr/sbin/json-mqtt-proxy
exit 0
exit 0

Loading…
Cancel
Save