From 367d74769114b68fb0d1eee727102474b2516b21 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Fri, 22 Dec 2023 23:14:26 -0600 Subject: [PATCH] Update temp.inc.sh --- inc/temp.inc.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/temp.inc.sh b/inc/temp.inc.sh index b860590c..d8980dbe 100644 --- a/inc/temp.inc.sh +++ b/inc/temp.inc.sh @@ -653,7 +653,7 @@ SERVERROOM_TEMP_DIFFERENCE(){ # (( $(bc <<<"${largest_tempdiff} < 0") )) && tempdiff_tmp2=`echo "scale=2; ${largest_tempdiff} * -1" | bc` || tempdiff_tmp2=${largest_tempdiff} # [ $(bc -l <<< "${tempdiff_tmp1} >= ${tempdiff_tmp2}") -eq 1 ] && largest_tempdiff=${tempdiff} - [ "$(echo ${tempdiff} | grep '-')" != "" ] && tempdiff_tmp1=`echo "scale=2; ${tempdiff} * -1" | bc` || tempdiff_tmp1=${tempdiff} + (( $(bc <<<"${tempdiff} < 0") )) && tempdiff_tmp1=`echo "scale=2; ${tempdiff} * -1" | bc` || tempdiff_tmp1=${tempdiff} [ $(bc -l <<< "${tempdiff_tmp1} >= ${largest_tempdiff}") -eq 1 ] && largest_tempdiff=${tempdiff_tmp1} # [ $(bc -l <<< "${tempdiff} >= ${largest_tempdiff}") -eq 1 ] && largest_tempdiff=${tempdiff}