From 12a9bf3fd13d1671bea23bd70b86a459760325b5 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Thu, 8 Sep 2022 21:37:33 -0500 Subject: [PATCH] Update powerwall.sh --- powerwall.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/powerwall.sh b/powerwall.sh index 81b48afa..2b73b976 100755 --- a/powerwall.sh +++ b/powerwall.sh @@ -62,23 +62,23 @@ CHECKTEMP_SERVICE(){ if [ $(bc -l <<< "$temp_f >= $temp_warn") -eq 1 ] && [ $(bc -l <<< "$temp_f < $temp_crit") -eq 1 ]; then if [ $temp_diff -gt 1 ] || [ "$last_temp" == "1" ]; then - echo "($datetime) WARNING TEMP: $temp_f°F - (Difference of $temp_diff°)" | mail -s "${1} TEMP WARNING" $email_alert + echo "($datetime) WARNING TEMP: $temp_f°F - (Difference of $temp_diff°F)" | mail -s "${1} TEMP WARNING" $email_alert echo "alert sent" last_temp=$temp_f fi - echo "($datetime) WARNING: $temp_f°F - (Difference of $temp_diff°)" + echo "($datetime) WARNING: $temp_f°F - (Difference of $temp_diff°F)" elif [ $(bc -l <<< "$temp_f >= $temp_crit") -eq 1 ]; then if [ $temp_diff -gt 1 ] || [ "$last_temp" == "1" ]; then - echo "($datetime) CRITICAL TEMP: $temp_f°F - (Difference of $temp_diff°)" | mail -s "${1} TEMP CRITICAL" $email_alert + echo "($datetime) CRITICAL TEMP: $temp_f°F - (Difference of $temp_diff°F)" | mail -s "${1} TEMP CRITICAL" $email_alert echo "alert sent" last_temp=$temp_f fi - echo "($datetime) CRITICAL: $temp_f°F - (Difference of $temp_diff°)" + echo "($datetime) CRITICAL: $temp_f°F - (Difference of $temp_diff°F)" else if [ "$last_temp" > "1" ]; then - echo -e "($datetime) NORMAL TEMP: $temp_f°F\nPrevious Temp: $last_temp°F" | mail -s "${1} BACK TO NORMAL" $email_alert + echo -e "($datetime) NORMAL TEMP: $temp_f°F\nPrevious Temp: $last_tempf°FF" | mail -s "${1} BACK TO NORMAL" $email_alert echo "alert sent" elif [ "$last_temp" == "0" ]; then echo "NORMAL TEMP: $temp_f°F" | mail -s "${1} TEMP NORMAL" $email_alert;