Compare commits
No commits in common. "fd88f665417ca0c6c655f19d57da35df3ad45984" and "31a49d6b63274e144314c2989b54b3b9340c1f98" have entirely different histories.
fd88f66541
...
31a49d6b63
|
@ -74,11 +74,14 @@ media_player:
|
||||||
|
|
||||||
# Poe switch!
|
# Poe switch!
|
||||||
switch:
|
switch:
|
||||||
- platform: command_line
|
- platform: telnet
|
||||||
switches:
|
switches:
|
||||||
lab_camera_power:
|
lab_camera_power:
|
||||||
command_on: bash /config/scripts/hpe_switch.sh 2 on
|
resource: 10.85.3.96
|
||||||
command_off: bash /config/scripts/hpe_switch.sh 2 off
|
port: 22
|
||||||
|
command_on: "\n5\nconfig\ninterface 2 power"
|
||||||
|
command_off: "no interface 2 power"
|
||||||
|
timeout: 2
|
||||||
|
|
||||||
|
|
||||||
group: !include groups.yaml
|
group: !include groups.yaml
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
# Written by joe
|
|
||||||
# Usage:
|
|
||||||
# ./hpe_switch.sh <interface> <state>
|
|
||||||
|
|
||||||
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
|
|
Loading…
Reference in New Issue