Update powerwall.sh

This commit is contained in:
2023-05-12 22:27:35 -05:00
parent 116b138111
commit 850357c370

View File

@@ -143,7 +143,7 @@ CHECKACV_SERVICE(){
echo "($datetime) alert sent" >> ${logacv} echo "($datetime) alert sent" >> ${logacv}
battstatus=0 battstatus=0
else else
errtime=`date +%s`-$(stat -c %Y ${logacv}) errtime=$(expr `date +%s` - $(stat -c %Y ${logacv}))
[ $errtime -ge 60 ] && echo "($datetime) normal voltage: ${INPUTACV}V" >> ${logacv} [ $errtime -ge 60 ] && echo "($datetime) normal voltage: ${INPUTACV}V" >> ${logacv}
if [ $voltstatus -eq 0 ]; then if [ $voltstatus -eq 0 ]; then
echo -e "($datetime) Service Startup\nNormal voltage detected\nVOLTAGE: ${INPUTACV}V" | mail -s "Power Nominal" $email_alert echo -e "($datetime) Service Startup\nNormal voltage detected\nVOLTAGE: ${INPUTACV}V" | mail -s "Power Nominal" $email_alert