Update powerwall.sh
This commit is contained in:
@@ -1684,7 +1684,9 @@ HOSTPOWER(){
|
|||||||
|
|
||||||
if [ "${2^^}" == "ON" ] || [ "${2^^}" == "OFF" ] || [ "${2^^}" == "STATUS" ]; then
|
if [ "${2^^}" == "ON" ] || [ "${2^^}" == "OFF" ] || [ "${2^^}" == "STATUS" ]; then
|
||||||
if [ "${idracip}" == "10.10.2.20" ] && [ "${2^^}" == "ON" ]; 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
|
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)
|
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
|
sleep 3s
|
||||||
@@ -1703,7 +1705,9 @@ HOSTPOWER(){
|
|||||||
echo -e "${idsCL[Default]}"
|
echo -e "${idsCL[Default]}"
|
||||||
|
|
||||||
if [ "${idracip}" == "10.10.2.20" ] && [ "${2^^}" == "OFF" ]; then
|
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 [ "${TEST}" != "true" ]; then
|
||||||
if [ "$(CHECK_HOST 10.10.2.10)" == "false" ]; 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)
|
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)
|
||||||
|
|||||||
Reference in New Issue
Block a user