[mystrom] add script to turn devices on
This commit is contained in:
parent
84944f2584
commit
496b354245
1 changed files with 17 additions and 0 deletions
17
mystrom-on.sh
Executable file
17
mystrom-on.sh
Executable 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
|
Loading…
Reference in a new issue