Update offsite-power-check.sh
This commit is contained in:
@@ -56,6 +56,15 @@ $(date)"
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ${OFFSITE_VOLTIN%.*} -gt 105 ]; then
|
if [ ${OFFSITE_VOLTIN%.*} -gt 105 ]; then
|
||||||
|
if [ "${charging}" == "true" ] && [ ${OFFSITE_BATT_CAP%.*} -eq 100 ]; then
|
||||||
|
echo "($(date +'%Y-%m-%d %H:%M:%S')) - ${OFFSITE_VOLTIN}'volts - ${OFFSITE_BATT_CAP}% Battery - Charging Complete" >> ${PW_LOGFILE}
|
||||||
|
SENDNOTICE "OFFSITE POWER" "Batteries are fully recharged"
|
||||||
|
charging=false
|
||||||
|
elif [ ${OFFSITE_BATT_CAP%.*} -lt 100 ]; then
|
||||||
|
charging=true
|
||||||
|
else
|
||||||
|
charging=false
|
||||||
|
fi
|
||||||
if [ -f ${PW_TMPFOLDER}/power.offsite.ac.low ]; then
|
if [ -f ${PW_TMPFOLDER}/power.offsite.ac.low ]; then
|
||||||
if [ -f ${PW_TMPFOLDER}/power.offsite.off ]; then
|
if [ -f ${PW_TMPFOLDER}/power.offsite.off ]; then
|
||||||
echo "($(date +'%Y-%m-%d %H:%M:%S')) - ${OFFSITE_VOLTIN}'volts - ${OFFSITE_BATT_CAP}% Battery - Offsite Power Restored" >> ${PW_LOGFILE}
|
echo "($(date +'%Y-%m-%d %H:%M:%S')) - ${OFFSITE_VOLTIN}'volts - ${OFFSITE_BATT_CAP}% Battery - Offsite Power Restored" >> ${PW_LOGFILE}
|
||||||
|
|||||||
Reference in New Issue
Block a user