Update powerwall.sh

This commit is contained in:
2023-12-03 13:13:44 -06:00
parent 7c3b84e174
commit 59e6a1b265

View File

@@ -1590,7 +1590,8 @@ PDUCONTROL(){
portpower=$(snmpwalk -t 1 -r 0 -v 1 -c public ${PW_APCPDU_IP} .1.3.6.1.4.1.318.1.1.12.3.3.1.1.4.${p} -O vq 2> /dev/null | sed -e 's/"//g')
[ ${portpower} -eq 1 ] && portpower_disp="${idsCL[Green]}ON" || portpower_disp="${idsCL[LightRed]}OFF"
[ ${p} -lt 10 ] && pp=" ${p}" || pp=${p}
echo -e "${ii}) ${idsCL[LightCyan]}${port} - ${portpower_disp}${idsCL[Default]}"
c=0; spc=''; spc1=`expr 28 - ${#port}`; until [ ${c} = ${spc1} ]; do spc="${spc} "; c=`expr ${c} + 1`; done
echo -e "${pp}) ${idsCL[LightCyan]}${port}${spc}${idsCL[Default]}: ${portpower_disp}${idsCL[Default]}"
done
fi
}