Send json file directly instead of cat

This commit is contained in:
Dennis Eisold 2022-03-07 11:33:17 +01:00
parent 9c97da67ca
commit b75041997b
1 changed files with 1 additions and 1 deletions

View File

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