diff --git a/powerwall.sh b/powerwall.sh index eb72cf4c..2711dea4 100755 --- a/powerwall.sh +++ b/powerwall.sh @@ -143,7 +143,8 @@ CHECKACV_SERVICE(){ echo "($datetime) alert sent" >> ${logacv} battstatus=0 else - [ $VERBOSE = true ] && echo "($datetime) normal voltage: ${INPUTACV}V" >> ${logacv} + errtime=`date +%s`-$(stat -c %Y ${logacv}) + [ $errtime -ge 60 ] && echo "($datetime) normal voltage: ${INPUTACV}V" >> ${logacv} if [ $voltstatus -eq 0 ]; then echo -e "($datetime) Service Startup\nNormal voltage detected\nVOLTAGE: ${INPUTACV}V" | mail -s "Power Nominal" $email_alert echo "($datetime) alert sent - service start" >> ${logacv}