Update powerwall.sh
This commit is contained in:
@@ -58,14 +58,14 @@ CHECKTEMP_SERVICE(){
|
|||||||
|
|
||||||
if [ $(bc -l <<< "$temp_f >= $temp_warn") -eq 1 ] && [ $(bc -l <<< "$temp_f < $temp_crit") -eq 1 ]; then
|
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" == "0" ]; then
|
if [ $temp_diff -gt 1 ] || [ "$last_temp" == "0" ]; then
|
||||||
echo "($temp_diff) WARNING TEMP: $temp_f°F" | mail -s "${1} TEMP WARNING" $email_alert
|
echo "WARNING TEMP: $temp_f°F - (Difference of $temp_diff°)" | mail -s "${1} TEMP WARNING" $email_alert
|
||||||
last_temp=$temp_f
|
last_temp=$temp_f
|
||||||
fi
|
fi
|
||||||
echo "($temp_d @ $temp_t) WARNING: $temp_f°F"
|
echo "($temp_d @ $temp_t) WARNING: $temp_f°F"
|
||||||
|
|
||||||
elif [ $(bc -l <<< "$temp_f >= $temp_crit") -eq 1 ]; then
|
elif [ $(bc -l <<< "$temp_f >= $temp_crit") -eq 1 ]; then
|
||||||
if [ $temp_diff -gt 1 ] || [ "$last_temp" == "0" ]; then
|
if [ $temp_diff -gt 1 ] || [ "$last_temp" == "0" ]; then
|
||||||
echo "CRITICAL TEMP: $temp_f°F" | mail -s "${1} TEMP CRITICAL" $email_alert
|
echo "CRITICAL TEMP: $temp_f°F - (Difference of $temp_diff°)" | mail -s "${1} TEMP CRITICAL" $email_alert
|
||||||
last_temp=$temp_f
|
last_temp=$temp_f
|
||||||
fi
|
fi
|
||||||
echo "($temp_d @ $temp_t) CRITICAL: $temp_f°F"
|
echo "($temp_d @ $temp_t) CRITICAL: $temp_f°F"
|
||||||
|
|||||||
Reference in New Issue
Block a user