Note, the relay's channels default state when plugged in are off.
-WARNING: If you lose access to the machine controlling a relay and a
-relay channel is stuck on, you will need to manually replug usb power to
-the relay so the channel goes back to its default off state before you
-can turn on the server it is connected to, because its as if the servers
-power button is stuck being held down. That is why this script runs
-locally and ignores signals when its running.
+WARNING: Avoid ever manually running "hidusb-relay-cmd on" in
+production, because if you lose connectivity and can't turn it off, its
+like the server's power button is stuck being pushed in and it won't
+turn on in that state. You will need to physically replug usb power to
+the relay so the channel goes back to its default off state. If this
+script somehow dies after turning a relay on, running it again will turn
+it off. That is why this script runs locally and ignores signals when
+its running. If you run this script over ssh and lose connection as this
+script is running, it will continue to run and complete.
Example config:
source /etc/libremanage.conf
fi
-# we know HOSTNAME is given if it doesn't start with a number.
+# Use config vars. We know the arg is a HOSTNAME if it doesn't start
+# with a number.
if [[ $chan != [0-9]* ]]; then
if [[ ! $board_id ]]; then
board_id_var=${chan}_board_id