ungleich-tools/mystrom/mystrom-toggle.sh

19 lines
303 B
Bash
Raw Normal View History

2020-12-09 11:57:28 +00:00
#!/bin/sh
# 2020-12-07, Nico Schottelius
set -x
exec >>/tmp/foo
exec 2>&1
if [ $# -lt 1 ]; then
echo "$0 hostname [hostname...]"
echo " hostname: which mystrom to connect to"
exit 1
fi
while [ $# -ge 1 ]; do
hostname=$1; shift
http --json GET "http://${hostname}/toggle"
done