Update powerwall.sh

This commit is contained in:
2022-09-08 21:39:14 -05:00
parent aece42860d
commit ad814794ab

View File

@@ -77,10 +77,10 @@ CHECKTEMP_SERVICE(){
echo "($datetime) CRITICAL: $temp_f°F - (Difference of $temp_diff°)" echo "($datetime) CRITICAL: $temp_f°F - (Difference of $temp_diff°)"
else else
if [ "$last_temp" > "1" ]; then if [ $last_temp -gt 1 ]; then
echo -e "($datetime) NORMAL TEMP: $temp_f°F\nPrevious Temp: $last_tempf°FF" | 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" echo "alert sent"
elif [ "$last_temp" == "0" ]; then elif [ "$last_temp" = "0" ]; then
echo "NORMAL TEMP: $temp_f°F" | mail -s "${1} TEMP NORMAL" $email_alert; echo "NORMAL TEMP: $temp_f°F" | mail -s "${1} TEMP NORMAL" $email_alert;
fi fi
last_temp=1 last_temp=1