Update powerwall.sh
This commit is contained in:
@@ -77,12 +77,13 @@ 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" > "1" ]; then
|
||||||
echo "($datetime) NORMAL TEMP: $temp_f°F" | mail -s "${1} BACK TO NORMAL" $email_alert
|
echo "($datetime) NORMAL TEMP: $temp_f°F" | mail -s "${1} BACK TO NORMAL" $email_alert
|
||||||
echo "alert sent"
|
echo "alert sent"
|
||||||
last_temp=1
|
elif [ "$last_temp" == "0" ]; then
|
||||||
|
echo "NORMAL TEMP: $temp_f°F" | mail -s "${1} TEMP NORMAL" $email_alert;
|
||||||
fi
|
fi
|
||||||
[ "$last_temp" == "0" ] && echo "NORMAL TEMP: $temp_f°F" | mail -s "${1} TEMP NORMAL" $email_alert; last_temp=1
|
last_temp=1
|
||||||
echo "($datetime) normal: $temp_f°F"
|
echo "($datetime) normal: $temp_f°F"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user