Fix units
This commit is contained in:
parent
9899e7aa98
commit
e7e80d974a
1 changed files with 4 additions and 4 deletions
|
@ -84,14 +84,14 @@ fi
|
||||||
temp=${output/temp=/}
|
temp=${output/temp=/}
|
||||||
temp=${temp/\'C/}
|
temp=${temp/\'C/}
|
||||||
|
|
||||||
unit="'C"
|
unit="C"
|
||||||
if $FAHRENHEIT; then
|
if $FAHRENHEIT; then
|
||||||
temp=$(bc <<< "scale=1; ($temp * 1.8) + 32")
|
temp=$(bc <<< "scale=1; ($temp * 1.8) + 32")
|
||||||
unit="'F"
|
unit="F"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
log "$temp$unit. Warn: $WARN, Crit: $CRIT"
|
log "$temp'$unit. Warn: $WARN'$unit, Crit: $CRIT'$unit"
|
||||||
|
|
||||||
c=$(bc <<< "$temp > $CRIT")
|
c=$(bc <<< "$temp > $CRIT")
|
||||||
w=$(bc <<< "$temp > $WARN")
|
w=$(bc <<< "$temp > $WARN")
|
||||||
|
@ -102,7 +102,7 @@ elif [ $w -eq 1 ]; then
|
||||||
else
|
else
|
||||||
result="OK"
|
result="OK"
|
||||||
fi
|
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
|
case $result in
|
||||||
|
|
Loading…
Reference in a new issue