Update powerwall.sh

This commit is contained in:
2022-09-08 21:37:59 -05:00
parent 12a9bf3fd1
commit aece42860d

View File

@@ -62,19 +62,19 @@ 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°F)" | mail -s "${1} TEMP WARNING" $email_alert
echo "($datetime) WARNING TEMP: $temp_f°F - (Difference of $temp_diff°)" | 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°F)"
echo "($datetime) WARNING: $temp_f°F - (Difference of $temp_diff°)"
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°F)" | mail -s "${1} TEMP CRITICAL" $email_alert
echo "($datetime) CRITICAL TEMP: $temp_f°F - (Difference of $temp_diff°)" | 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°F)"
echo "($datetime) CRITICAL: $temp_f°F - (Difference of $temp_diff°)"
else
if [ "$last_temp" > "1" ]; then