Update powerwall.sh

This commit is contained in:
2023-12-09 19:44:17 -06:00
parent 4edd3ede93
commit 019b6aada7

View File

@@ -1684,7 +1684,9 @@ HOSTPOWER(){
if [ "${2^^}" == "ON" ] || [ "${2^^}" == "OFF" ] || [ "${2^^}" == "STATUS" ]; then
if [ "${idracip}" == "10.10.2.20" ] && [ "${2^^}" == "ON" ]; then
echo -en "\n${idsCL[LightCyan]}Powering ON the SAS Enclosure ... "
MSG="Powering ON the SAS Enclosure"
c=0; MSG_SPC=''; spc1=`expr ${hc_cw} - ${#MSG}`; until [ ${c} = ${spc1} ]; do MSG_SPC="${MSG_SPC} "; ((c++)); done
echo -en "\n${idsCL[LightCyan]}${MSG}${MSG_SPC}: "
if [ "${TEST}" != "true" ]; then
run=$(snmpset -v 1 -c private ${PW_APCPDU_IP} .1.3.6.1.4.1.318.1.1.12.3.3.1.1.4.14 i 1 >/dev/null 2>&1)
sleep 3s
@@ -1703,7 +1705,9 @@ HOSTPOWER(){
echo -e "${idsCL[Default]}"
if [ "${idracip}" == "10.10.2.20" ] && [ "${2^^}" == "OFF" ]; then
echo -en "${idsCL[LightCyan]}Powering OFF the SAS Enclosure ... "
MSG="Powering OFF the SAS Enclosure"
c=0; MSG_SPC=''; spc1=`expr ${hc_cw} - ${#MSG}`; until [ ${c} = ${spc1} ]; do MSG_SPC="${MSG_SPC} "; ((c++)); done
echo -en "${idsCL[LightCyan]}${MSG}${MSG_SPC}: "
if [ "${TEST}" != "true" ]; then
if [ "$(CHECK_HOST 10.10.2.10)" == "false" ]; then
run=$(snmpset -v 1 -c private ${PW_APCPDU_IP} .1.3.6.1.4.1.318.1.1.12.3.3.1.1.4.14 i 2 >/dev/null 2>&1)