Update power.inc.sh

This commit is contained in:
2024-01-14 20:12:18 -06:00
parent 3f1e219e79
commit f91ef85d4e

View File

@@ -917,7 +917,7 @@ PDUCONTROL(){
read -n 1 portchange_confirm
case "${portchange_confirm}" in
[Yy])
[ ${portsel_power} -eq 1 ] && portsel_change=2 || portsel_change=1
[ ${PORT_POWER[${tp}]} -eq 1 ] && portsel_change=2 || portsel_change=1
echo -en "\n\n${idsCL[LightCyan]}Turning ${portsel_change_power_disp}${idsCL[LightCyan]} port ${idsCL[Yellow]}${PORTSEL}${idsCL[Default]} ... "
run=$(snmpset -v 1 -c private ${PW_APCPDU_IP} .1.3.6.1.4.1.318.1.1.12.3.3.1.1.4.${PORTSEL} i ${portsel_change} >/dev/null 2>&1)
echo -e "${idsCL[Green]}Done${idsCL[Default]}"