diff options
| author | st33v <github@f3rr3t.com> | 2018-01-09 17:43:22 +1100 |
|---|---|---|
| committer | st33v <github@f3rr3t.com> | 2018-01-09 17:43:22 +1100 |
| commit | cbc793ce8428c556844f570e457e3aa869e9a0de (patch) | |
| tree | d4d5d138236447095e945fd83ea14f45fc41444b /publishTemperature.sh | |
| parent | 12fa4aee2828de642145294fe190bdb27c5388d0 (diff) | |
Diffstat (limited to 'publishTemperature.sh')
| -rwxr-xr-x | publishTemperature.sh | 4 |
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 |
