From eb7ee6b387b3fcbe3ce69e074f1c9cd744db07bb Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Sat, 27 May 2023 16:59:47 -0500 Subject: [PATCH] Update powerwall.sh --- powerwall.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/powerwall.sh b/powerwall.sh index 26fd4dc4..d51e53f9 100755 --- a/powerwall.sh +++ b/powerwall.sh @@ -63,14 +63,14 @@ CHECKTEMPSENSOR(){ #echo "$temp_c -> $temp_f" if [ $(bc -l <<< "$temp_f >= $temp_warn") -eq 1 ] && [ $(bc -l <<< "$temp_f < $temp_crit") -eq 1 ]; then - echo -en "${idsCL[Yellow]}WARNING (${temp_f}'F/${average}'F)${idsCL[Default]}" + echo -en "${idsCL[Yellow]}WARNING (${temp_f}'F / ${average}'F)${idsCL[Default]}" elif [ $(bc -l <<< "$temp_f >= $temp_crit") -eq 1 ]; then - echo -en "${idsCL[Red]}CRITICAL (${temp_f}'F/${average}'F)${idsCL[Default]}" + echo -en "${idsCL[Red]}CRITICAL (${temp_f}'F / ${average}'F)${idsCL[Default]}" else - echo -en "${idsCL[Green]}Normal (${temp_f}'F/${average}'F)${idsCL[Default]}" + echo -en "${idsCL[Green]}Normal (${temp_f}'F / ${average}'F)${idsCL[Default]}" fi - c=0; spc=''; spc1=`expr 13 - ${#temp_f} - 2`; until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done + c=0; spc=''; spc1=`expr 10 - ${#temp_f} - 2`; until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done [ ${#temp_warn} == 2 ] && spcw=' ' || spcw=' ' [ ${#temp_crit} == 2 ] && spcc=' ' || spcc=' ' echo -e "${spc}[${spcw}${idsCL[Green]}<=$(expr ${temp_warn} - 1)'F${idsCL[Default]} /${spcw}${idsCL[Yellow]}${temp_warn}'F${idsCL[Default]} /${spcc}${idsCL[Red]}${temp_crit}'F${idsCL[Default]} ]"