Update offsite-power-check.sh

This commit is contained in:
2023-11-07 19:41:04 -06:00
parent b24900489f
commit cfa879ce3b

View File

@@ -90,7 +90,7 @@ $(date)"
fi
else
if [ ! -f ${PW_TMPFOLDER}/power.offsite.ac.low ] || [ $(expr `date +%s` - $(stat -f %m ${PW_TMPFOLDER}/power.offsite.ac.low)) -gt 240 ]; then
echo "($(date +'%Y-%m-%d %H:%M:%S')) - ${OFFSITE_VOLTIN}'volts - ${OFFSITE_BATT_CAP}% Battery - Powering LOW/OFF!" >> ${PW_LOGFILE}
# echo "($(date +'%Y-%m-%d %H:%M:%S')) - ${OFFSITE_VOLTIN}'volts - ${OFFSITE_BATT_CAP}% Battery - Powering LOW/OFF!" >> ${PW_LOGFILE}
SENDNOTICE "OFFSITE POWER - POWER OFF/LOW!!" "Power off or low voltage detected" 1
touch ${PW_TMPFOLDER}/power.offsite.ac.low
fi