[mystrom] add script to turn devices on

This commit is contained in:
Nico Schottelius 2020-12-07 13:43:10 +01:00
parent 84944f2584
commit 496b354245

17
mystrom-on.sh Executable file
View file

@ -0,0 +1,17 @@
#!/bin/sh
# 2020-12-07, Nico Schottelius
if [ $# -lt 1 ]; then
echo "$0 hostname [hostname...]"
echo " hostname: which mystrom to turn on"
exit 1
fi
while [ $# -ge 1 ]; do
hostname=$1; shift
curl --location \
--request GET \
"http://${hostname}/relay?state=1"
done