update
This commit is contained in:
@@ -420,7 +420,7 @@ BATT VOLTAGE: ${BATTVOLT}'volts" 1
|
||||
if (( $(bc <<<"${BATTVOLT} <= ${min_battvolt_sys}") )); then
|
||||
[ ! -f ${PW_TMPFOLDER}/power.dc.critlow ] && touch ${PW_TMPFOLDER}/power.dc.critlow
|
||||
|
||||
if [ ! -f ${PW_TMPFOLDER}/power.sys.off ] && (( $(bc <<<"${INPUTACV} < ${min_acvolt}") )); then
|
||||
if [ ! -f ${PW_TMPFOLDER}/shutdown.SYS.started ] && [ ! -f ${PW_TMPFOLDER}/shutdown.MAINSITE.started ] && (( $(bc <<<"${INPUTACV} < ${min_acvolt}") )); then
|
||||
echo "($(date +'%Y-%m-%d %H:%M:%S')) - ${BATTVOLT}'volts - Shutting down all remaining servers..." >> ${PW_LOGFILE}
|
||||
echo "($(date +'%Y-%m-%d %H:%M:%S')) - ${BATTVOLT}'volts - Shutting down all remaining servers..." >> ${PW_LOGPOWER}
|
||||
SENDNOTICE "BATT-VOLT REALLY LOW: SHUTDOWN SYS SERVERS" "Battery Voltage REALLY LOW: ${BATTVOLT}'volts
|
||||
@@ -432,7 +432,7 @@ Shutting down all remaining servers" 1
|
||||
elif (( $(bc <<<"${BATTVOLT} < ${min_battvolt}") )); then
|
||||
[ ! -f ${PW_TMPFOLDER}/power.dc.low ] && touch ${PW_TMPFOLDER}/power.dc.low
|
||||
|
||||
if [ ! -f ${PW_TMPFOLDER}/power.main.off ] && (( $(bc <<<"${INPUTACV} < ${min_acvolt}") )); then
|
||||
if [ ! -f ${PW_TMPFOLDER}/shutdown.MAIN.started ] && (( $(bc <<<"${INPUTACV} < ${min_acvolt}") )); then
|
||||
echo "($(date +'%Y-%m-%d %H:%M:%S')) - ${BATTVOLT}'volts - Shutting down main servers..." >> ${PW_LOGFILE}
|
||||
echo "($(date +'%Y-%m-%d %H:%M:%S')) - ${BATTVOLT}'volts - Shutting down main servers..." >> ${PW_LOGPOWER}
|
||||
SENDNOTICE "BATT-VOLT LOW: SHUTDOWN MAIN SERVERS" "Battery Voltage LOW: ${BATTVOLT}'volts
|
||||
@@ -441,7 +441,7 @@ Shutting down main servers" 1
|
||||
|
||||
fi
|
||||
|
||||
elif [ ! -f ${PW_TMPFOLDER}/power.main.off ] && [ $(expr `date +%s` - $(stat -c %Y ${PW_TMPFOLDER}/power.dc.low)) -ge $(echo "scale=0; ${PW_SHUTDOWN_MAINSERVERS_AFTER}*60" | bc) ]; then
|
||||
elif [ ! -f ${PW_TMPFOLDER}/shutdown.MAIN.started ] && [ $(expr `date +%s` - $(stat -c %Y ${PW_TMPFOLDER}/power.dc.low)) -ge $(echo "scale=0; ${PW_SHUTDOWN_MAINSERVERS_AFTER}*60" | bc) ]; then
|
||||
echo "($(date +'%Y-%m-%d %H:%M:%S')) - ${BATTVOLT}'volts - Shutting down main servers..." >> ${PW_LOGFILE}
|
||||
echo "($(date +'%Y-%m-%d %H:%M:%S')) - ${BATTVOLT}'volts - Shutting down main servers..." >> ${PW_LOGPOWER}
|
||||
SENDNOTICE "BATT-VOLT LOW: SHUTDOWN MAIN SERVERS" "Battery Voltage LOW: ${BATTVOLT}'volts
|
||||
|
||||
Reference in New Issue
Block a user