From cbc793ce8428c556844f570e457e3aa869e9a0de Mon Sep 17 00:00:00 2001 From: st33v Date: Tue, 9 Jan 2018 17:43:22 +1100 Subject: proof of concept --- publishTemperature.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/publishTemperature.sh b/publishTemperature.sh index 0299db9..1c20811 100755 --- a/publishTemperature.sh +++ b/publishTemperature.sh @@ -3,7 +3,7 @@ # SJP 9 Jan 2018 # Designed to be called from a timer service. # -cpuTemp=echo "scale=1; $(cat /sys/class/thermal/thermal_zone0/temp)/1000" | bc +cpuTemp=$(echo "scale=1; $(cat /sys/class/thermal/thermal_zone0/temp)/1000" | bc) -mosquitto_pub -h stan -t stan/test/cpu/${cpuTemp} +mosquitto_pub -h stan -m "CPU temp is ${cpuTemp}" -t stan/test/cpu -- cgit v1.3