update
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
|
||||
VERS='2.4.16-12112023'
|
||||
VERS='2.4.17-12112023'
|
||||
|
||||
noheader=' update service dailytemp '
|
||||
hc_cw=60
|
||||
|
||||
26
powerwall.sh
26
powerwall.sh
@@ -871,13 +871,19 @@ BATT VOLTAGE: ${BATTVOLT}'volts"
|
||||
echo "($(date +'%Y-%m-%d %H:%M:%S')) - Input: ${INPUTACV}'volts - 'Check Power' Service Startup - Normal voltage detected" >> ${PW_LOGPOWER}
|
||||
fi
|
||||
fi
|
||||
if [ ! -f ${PW_TMPFOLDER}/power.ac.good ]; then
|
||||
# if [ -f ${PW_TMPFOLDER}/power.sys.off ]
|
||||
#
|
||||
# fi
|
||||
if [ ! -f ${PW_TMPFOLDER}/power.ac.good ]; then
|
||||
|
||||
if [ -f ${PW_TMPFOLDER}/power.sys.off ] || [ -f ${PW_TMPFOLDER}/power.main.off ] || [ -f ${PW_TMPFOLDER}/power.ac.conserve ]
|
||||
SENDNOTICE "HOSTS POWER" "Power restored! Will wait 3'mins before turning host(s) back on"
|
||||
touch ${PW_TMPFOLDER}/.power.restored
|
||||
fi
|
||||
|
||||
rm -f ${PW_TMPFOLDER}/power.ac.*
|
||||
touch ${PW_TMPFOLDER}/power.ac.good
|
||||
|
||||
elif [ -f ${PW_TMPFOLDER}/.power.restored ] && [ $(expr `date +%s` - $(stat -c %Y ${PW_TMPFOLDER}/.power.restored)) -ge 300 ]; then
|
||||
HOSTMGMT mainsite -p on >/dev/null 2>&1
|
||||
rm -f ${PW_TMPFOLDER}/.power.restored
|
||||
fi
|
||||
|
||||
# UPDATE APC-PDU LINE TO LINE VOLTAGE
|
||||
@@ -1171,12 +1177,14 @@ CHECK_SERVICES(){
|
||||
|
||||
SHUTDOWN_MAIN(){
|
||||
if [ "${1}" == "ServerRoomTH"] || [ "${1}" == "TEMP"]; then
|
||||
SHUTDOWN_SERVERS MAIN ${1}
|
||||
# SHUTDOWN_SERVERS MAIN ${1}
|
||||
HOSTMGMT main -e off >/dev/null 2>&1
|
||||
reason='Server Room Overheated!'
|
||||
sendnotice=true
|
||||
|
||||
elif [ "${1}" == "POWER"]; then
|
||||
SHUTDOWN_SERVERS MAIN ${1}
|
||||
# SHUTDOWN_SERVERS MAIN ${1}
|
||||
HOSTMGMT main -e off >/dev/null 2>&1
|
||||
reason='Low Power!'
|
||||
sendnotice=true
|
||||
|
||||
@@ -1194,12 +1202,14 @@ ${reason}" 1
|
||||
}
|
||||
SHUTDOWN_SYS(){
|
||||
if [ "${1}" == "ServerRoomTH"] || [ "${1}" == "TEMP"]; then
|
||||
SHUTDOWN_SERVERS SYS ${1}
|
||||
# SHUTDOWN_SERVERS SYS ${1}
|
||||
HOSTMGMT sys -e off >/dev/null 2>&1
|
||||
reason='Server Room Overheated!'
|
||||
sendnotice=true
|
||||
|
||||
elif [ "${1}" == "POWER"]; then
|
||||
SHUTDOWN_SERVERS SYS ${1}
|
||||
# SHUTDOWN_SERVERS SYS ${1}
|
||||
HOSTMGMT sys -e off >/dev/null 2>&1
|
||||
reason='Low Power!'
|
||||
sendnotice=true
|
||||
|
||||
|
||||
Reference in New Issue
Block a user