Update powerwall.sh

This commit is contained in:
2023-12-11 16:28:14 -06:00
parent 0a1d475f02
commit f8bf207af4

View File

@@ -1108,15 +1108,14 @@ POWERLOGGER_SERVICE(){
done
fi
fi
done
done
if [ "$(compgen -G "${PW_TMPFOLDER}/temp.*")" != "" ] || [ "$(compgen -G "${PW_TMPFOLDER}/power.*")" != "" ]; then
sleep 1m
else
sleep 5m
fi
done
}
@@ -1177,14 +1176,14 @@ CHECK_SERVICES(){
SHUTDOWN_MAIN(){
if [ "${1}" == "ServerRoomTH"] || [ "${1}" == "TEMP"]; then
# SHUTDOWN_SERVERS MAIN ${1}
HOSTMGMT main -e off >/dev/null 2>&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}
HOSTMGMT main -e off >/dev/null 2>&1
SHUTDOWN_SERVERS MAIN ${1}
# HOSTMGMT main -e off >/dev/null 2>&1
reason='Low Power!'
sendnotice=true
@@ -1202,14 +1201,14 @@ ${reason}" 1
}
SHUTDOWN_SYS(){
if [ "${1}" == "ServerRoomTH"] || [ "${1}" == "TEMP"]; then
# SHUTDOWN_SERVERS SYS ${1}
HOSTMGMT sys -e off >/dev/null 2>&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}
HOSTMGMT sys -e off >/dev/null 2>&1
SHUTDOWN_SERVERS SYS ${1}
# HOSTMGMT sys -e off >/dev/null 2>&1
reason='Low Power!'
sendnotice=true