diff --git a/powerwall.sh b/powerwall.sh index 6dd5f9be..60938b77 100755 --- a/powerwall.sh +++ b/powerwall.sh @@ -25,9 +25,9 @@ CHECKTEMP(){ echo ${TEMP_THRESHOLDS[${1}]} | cut -d',' -f 1 | read temp_warn echo ${TEMP_THRESHOLDS[${1}]} | cut -d',' -f 2 | read temp_crit - if [ $temp_f -ge ${temp_warn} ] && [ $temp_f -lt ${temp_crit} ]; then + if [ $temp_f -ge $(($temp_warn)) ] && [ $temp_f -lt $(($temp_crit)) ]; then echo "WARNING: $temp_f" - elif [ $temp_f -ge ${temp_crit} ]; then + elif [ $temp_f -ge $(($temp_crit)) ]; then echo "CRITICAL: $temp_f" else echo "normal: $temp_f"