From 54fe582db7894bede01b3d456f7c6306c1d09dd9 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Sat, 3 Sep 2022 11:40:55 -0500 Subject: [PATCH] Update powerwall.sh --- powerwall.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/powerwall.sh b/powerwall.sh index 60938b77..e3bf1602 100755 --- a/powerwall.sh +++ b/powerwall.sh @@ -24,10 +24,12 @@ CHECKTEMP(){ echo ${TEMP_THRESHOLDS[${1}]} | cut -d',' -f 1 | read temp_warn echo ${TEMP_THRESHOLDS[${1}]} | cut -d',' -f 2 | read temp_crit + temp_warn=$(($temp_warn)) + temp_crit=$(($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"