summaryrefslogtreecommitdiff
path: root/publishTemperature.sh
diff options
context:
space:
mode:
Diffstat (limited to 'publishTemperature.sh')
-rwxr-xr-xpublishTemperature.sh4
1 files 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