diff options
author | Erich Eckner <git@eckner.net> | 2022-07-28 18:18:12 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2022-07-28 18:18:12 +0200 |
commit | 221f46e26ec6df7decc76f394bdc92d537f7df7d (patch) | |
tree | 13ebaab3ab36bd85dd0b9dd0201db7df556e98f9 /lights-out.in | |
parent | 36c7be42b6f8d84442b92fb2fc7b857aaf14af57 (diff) | |
download | raspi-lights-out-221f46e26ec6df7decc76f394bdc92d537f7df7d.tar.xz |
remove colocation stuff - it's in its own program now
Diffstat (limited to 'lights-out.in')
-rw-r--r-- | lights-out.in | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/lights-out.in b/lights-out.in index ebed1eb..2071487 100644 --- a/lights-out.in +++ b/lights-out.in @@ -10,7 +10,6 @@ display_help() { >&2 printf ' lights-out name: print the name of the server\n' >&2 printf ' lights-out push $output $time: simulate push on $output for $time seconds\n' >&2 printf ' lights-out turn on: turn on machine if not yet running\n' - >&2 printf ' lights-out update colocation: update server state on colocation\n' } check_argument_count() { @@ -123,28 +122,6 @@ case "$1" in check_argument_count 1 "$@" "$0" 'turn' 'on' || exit $? ;; - 'update') - if [ $# -ne 2 ] \ - || [ "x$2" != 'xcolocation' ]; then - >&2 printf 'unknown command "%s"\n\n' "$*" - display_help - exit 1 - fi - power=$( - "$0" get power - ) || exit $? - if [ ${power} -eq 1 ] \ - && ping -c1 "${server}" 2>&1 >/dev/null; then - ping=1 - else - ping=0 - fi - curl -Ss "https://colocation.eckner.net/update.php?machine=${colocation_server}&key=${colocation_key}&power=${power}&ping=${ping}" || exit $? - ;; - 'update colocation') - check_argument_count 1 "$@" - "$0" 'update' 'colocation' || exit $? - ;; *) >&2 printf 'unknown command "%s"\n\n' "$1" display_help |