From 111fada893088d96299c1cfda3212ad3be485c15 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Mon, 6 Nov 2023 18:34:47 -0600 Subject: [PATCH] Update powerwall.sh --- powerwall.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/powerwall.sh b/powerwall.sh index d23d2913..6e7d89be 100755 --- a/powerwall.sh +++ b/powerwall.sh @@ -319,7 +319,7 @@ CHECKTEMP_SERVICE(){ elif [ $(bc -l <<< "${temp_f} >= ${temp_crit}") -eq 1 ] && [ $(bc -l <<< "${temp_f} < ${temp_crit_sys}") -eq 1 ]; then touch ${PW_TMPFOLDER}/temp.crit - if [ ${temp_diff} -gt 1 ] || [ "${last_temp[${SENSOR}]}" = "1" ]; then + if [ $(bc -l <<< "${temp_diff} > 1") -eq 1 ] || [ "${last_temp[${SENSOR}]}" = "1" ]; then SENDNOTICE "${SENSOR} TEMP CRITICAL" "CRITICAL TEMP: ${temp_f}'F - (Difference of ${temp_diff}') Shutting down servers!!" 1 echo "($(date +'%Y-%m-%d %H:%M:%S')) - ${temp_f}'F - CRITICAL - (Difference of ${temp_diff}'F)" >> ${logtemp} @@ -339,7 +339,7 @@ Shutting down servers!!" 1 fi elif [ $(bc -l <<< "${temp_f} >= ${temp_crit_sys}") -eq 1 ]; then touch ${PW_TMPFOLDER}/temp.critsys - if [ ${temp_diff} -gt 1 ] || [ "${last_temp[${SENSOR}]}" = "1" ]; then + if [ $(bc -l <<< "${temp_diff} > 1") -eq 1 ] || [ "${last_temp[${SENSOR}]}" = "1" ]; then SENDNOTICE "${SENSOR} TEMP CRITICAL" "SYSTEM CRITICAL TEMP: ${temp_f}'F - (Difference of ${temp_diff}')" 1 echo "($(date +'%Y-%m-%d %H:%M:%S')) - ${temp_f}'F - SYSTEM CRITICAL - (Difference of ${temp_diff})" >> ${logtemp} echo -e "($(date +'%Y-%m-%d %H:%M:%S')) - ${temp_f}'F - ${SENSOR} - CRITICAL TEMP SYSTEM - (Difference of ${temp_diff}')" >> ${PW_LOGFILE}