Update powerwall.sh

This commit is contained in:
2023-11-06 18:10:48 -06:00
parent 68d1c63caa
commit 60cdb8368d

View File

@@ -228,6 +228,7 @@ CHECKTEMP_SERVICE(){
if [ "${PW_HOST_IDRACS[${SENSORa}]}" == "10.2.1.21" ]; then
vHOSTFAN=$(snmpwalk -v 1 -c public -t 2 ${PW_HOST_IDRACS[${SENSORa}]} .1.3.6.1.4.1.674.10892.5.4.700.12.1.6.1.1 -O vq)
FanSpeed=`echo "scale=2; ${vHOSTFAN}/21200" | bc`; FanSpeed=`echo "scale=0; ${FanSpeed}*100" | bc | sed -e 's/.00//g'`
echo "HERE: ${vHOSTFAN} - ${FanSpeed}"
if [ ${FanSpeed} -gt 92 ]; then
SENDNOTICE "${PW_HOST_IDRACS[${SENSORa}]} Fan Issue" "Workaround commands sent to set the Fans at 30%25" 1
run=$(ipmitool -I lanplus -H ${vHOSTiDRACIP} -U ${PW_ESXI_USER} -P "${PW_ESXI_PASS}" raw 0x30 0x30 0x01 0x00)
@@ -1559,9 +1560,9 @@ fi
logrotate) LOGROTATE;;
update)
echo -en "${idsCL[LightCyan]}Will reboot monitoring services in the background to apply updates ... "
RESTARTALL_SERVICES >/dev/null 2>&1 &
echo -e "${idsCL[Green]}Done${idsCL[Default]}\n"
# echo -en "${idsCL[LightCyan]}Will reboot monitoring services in the background to apply updates ... "
# RESTARTALL_SERVICES >/dev/null 2>&1 &
# echo -e "${idsCL[Green]}Done${idsCL[Default]}\n"
;;
status)
CHECKPOWER