From e7e80d974a9010c75de69a6faea761be84d04511 Mon Sep 17 00:00:00 2001 From: root Date: Sat, 6 Aug 2022 20:57:42 +0100 Subject: [PATCH] Fix units --- check_rpi_temperature.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/check_rpi_temperature.sh b/check_rpi_temperature.sh index 9e49b7c..e3884b5 100755 --- a/check_rpi_temperature.sh +++ b/check_rpi_temperature.sh @@ -84,14 +84,14 @@ fi temp=${output/temp=/} temp=${temp/\'C/} -unit="'C" +unit="C" if $FAHRENHEIT; then temp=$(bc <<< "scale=1; ($temp * 1.8) + 32") - unit="'F" + unit="F" fi -log "$temp$unit. Warn: $WARN, Crit: $CRIT" +log "$temp'$unit. Warn: $WARN'$unit, Crit: $CRIT'$unit" c=$(bc <<< "$temp > $CRIT") w=$(bc <<< "$temp > $WARN") @@ -102,7 +102,7 @@ elif [ $w -eq 1 ]; then else result="OK" fi -echo "$result. $temp$unit | 'temperature'=$temp;$unit;$WARN;$CRIT;-40;85" +echo "$result. $temp'$unit | 'temperature'=$temp$unit;$WARN;$CRIT;-40;85" case $result in