diff --git a/scripts/hpe_switch.sh b/scripts/hpe_switch.sh new file mode 100755 index 0000000..8556494 --- /dev/null +++ b/scripts/hpe_switch.sh @@ -0,0 +1,11 @@ +# Written by joe +# Usage: +# ./hpe_switch.sh + +if [ $2 = "on" ]; then + state="" +else + state="no" +fi + +{ sleep 1; echo -e ""; sleep 1; echo -e "5"; sleep 1; echo -e "config"; sleep 1; echo -e "$state interface $1 power"; sleep 1; echo -e "write memory"; sleep 1; echo -e "exit"; sleep 1; echo -e "exit"; sleep 1; echo -e "y"; } | telnet 10.85.3.96