From a5f3655c37bdb3d79b9e7d6bb6bc44d8aed92457 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Sat, 3 Sep 2022 11:55:16 -0500 Subject: [PATCH] Update powerwall.sh --- powerwall.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/powerwall.sh b/powerwall.sh index f610c8f1..a75094f4 100755 --- a/powerwall.sh +++ b/powerwall.sh @@ -26,9 +26,9 @@ CHECKTEMP(){ echo ${TEMP_THRESHOLDS[${1}]} | cut -d',' -f 2 | read temp_crit temp_f=72.2 - if [ $temp_f -ge ${temp_warn} ] && [ $temp_f -lt ${temp_crit} ]; then + if [ $(bc -l <<< "$temp_f >= $temp_warn") -eq 1 ] && [ $(bc -l <<< "$temp_f < $temp_crit") -eq 1 ]; then echo "WARNING: $temp_f" - elif [ $temp_f -ge ${temp_crit} ]; then + elif [ $(bc -l <<< "$temp_f >= $temp_crit") -eq 1 ]; then echo "CRITICAL: $temp_f" else echo "normal: $temp_f"