diff --git a/mystrom-status.sh b/mystrom-status.sh index 01f7366..d956cd1 100755 --- a/mystrom-status.sh +++ b/mystrom-status.sh @@ -10,6 +10,6 @@ fi while [ $# -ge 1 ]; do hostname=$1; shift - http --json "http://${hostname}/report" + http --json GET "http://${hostname}/report" done diff --git a/mystrom-toggle.sh b/mystrom-toggle.sh new file mode 100755 index 0000000..a397619 --- /dev/null +++ b/mystrom-toggle.sh @@ -0,0 +1,18 @@ +#!/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