update
This commit is contained in:
@@ -323,9 +323,7 @@ CHECKTEMP_SERVICE(){
|
||||
fi
|
||||
|
||||
if [ "${SENSOR}" == "ServerRoomTH" ]; then
|
||||
temp_f=`echo "scale=1; $(bc <<< "scale=1; ${temp_c}*1.8+32")+${PW_ServerRoomTH_Dev}" | bc`
|
||||
elif [ "${SENSOR}" == "ServerRoomLA" ]; then
|
||||
temp_f=${temp_c}
|
||||
temp_f=`echo "scale=1; ${temp_c}*1.8+32+${PW_ServerRoomTH_Dev}" | bc`
|
||||
else
|
||||
[ "${PW_SENSOR_TYPE[${SENSOR}]}" == "cpu" ] && temp_f=$(echo "scale=2; $temp_c/1" | bc -l) || temp_f=$(bc <<< "scale=1; ${temp_c}*1.8+32")
|
||||
(( $(bc <<<"${temp_f} < 1") )) && [[ "${temp_f}" = *"."* ]] && temp_f="0${temp_f}"
|
||||
|
||||
@@ -79,7 +79,7 @@ CHECK_SERVICES(){
|
||||
}
|
||||
|
||||
SHUTDOWN_MAIN(){
|
||||
if [ "${1}" == "ServerRoomTH" ] || [ "${1}" == "TEMP" ] || [ "${1}" == "POWER" ]; then
|
||||
if [ "${1}" == "ServerRoomTH" ] || [ "${1}" == "ServerRoomLA" ] || [ "${1}" == "TEMP" ] || [ "${1}" == "POWER" ]; then
|
||||
touch ${PW_TMPFOLDER}/shutdown.MAIN.started
|
||||
SHUTDOWN_SERVER main -esxi off
|
||||
[ "${1}" == "POWER" ] && reason='Low Power!' || reason='Server Room Overheated!'
|
||||
@@ -98,7 +98,7 @@ ${reason}" 1
|
||||
echo
|
||||
}
|
||||
SHUTDOWN_SYS(){
|
||||
if [ "${1}" == "ServerRoomTH" ] || [ "${1}" == "TEMP" ] || [ "${1}" == "POWER" ]; then
|
||||
if [ "${1}" == "ServerRoomTH" ] || [ "${1}" == "ServerRoomLA" ] || [ "${1}" == "TEMP" ] || [ "${1}" == "POWER" ]; then
|
||||
if [ ! -f ${PW_TMPFOLDER}/shutdown.MAIN ]; then
|
||||
touch ${PW_TMPFOLDER}/shutdown.MAINSITE.started
|
||||
SHUTDOWN_SERVER mainsite -esxi off
|
||||
|
||||
Reference in New Issue
Block a user