Update offsite-power-check.sh
This commit is contained in:
@@ -116,7 +116,8 @@ $(date)"
|
||||
touch ${PW_TMPFOLDER}/power.offsite.ac.low.notice
|
||||
fi
|
||||
|
||||
if ([ ${OFFSITE_BATT_CAP%.*} -le ${SHUTDOWNSERVERS_AT_LOAD} ] || [ $(expr `date +%s` - $(stat -f %m ${PW_TMPFOLDER}/power.offsite.ac.low)) -ge $(echo "scale=2; ${SHUTDOWNSERVERS_AFTER}*60" | bc) ]) && [ ! -f ${PW_TMPFOLDER}/power.offsite.off ]; then
|
||||
# if ([ ${OFFSITE_BATT_CAP%.*} -le ${SHUTDOWNSERVERS_AT_LOAD} ] || [ $(expr `date +%s` - $(stat -f %m ${PW_TMPFOLDER}/power.offsite.ac.low)) -ge $(echo "scale=2; ${SHUTDOWNSERVERS_AFTER}*60" | bc) ]) && [ ! -f ${PW_TMPFOLDER}/power.offsite.off ]; then
|
||||
if [ ${OFFSITE_BATT_CAP%.*} -le ${SHUTDOWNSERVERS_AT_LOAD} ] && [ ! -f ${PW_TMPFOLDER}/power.offsite.off ]; then
|
||||
echo "($(date +'%Y-%m-%d %H:%M:%S')) - ${OFFSITE_VOLTIN}'volts - ${OFFSITE_BATT_CAP}'% Battery - Powering Down Hosts!" >> ${PW_LOGFILE}
|
||||
SENDNOTICE "OFFSITE HOST POWER" "Powering DOWN offsite host(s) due to power outage" 1
|
||||
touch ${PW_TMPFOLDER}/power.offsite.off
|
||||
|
||||
Reference in New Issue
Block a user