From 91655f4486c47fb9f837acc9cb0e8842abf38fde Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Sat, 30 Jan 2021 20:57:50 +0100 Subject: neue Version: 0.1 --- Makefile | 2 +- lights-out.in | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index e71cf0c..72fee35 100644 --- a/Makefile +++ b/Makefile @@ -26,7 +26,7 @@ BINDIR = /usr/bin LIBDIR = /usr/lib HTTPDIR = /srv/http/lights-out -VERSION = 0.0 +VERSION = 0.1 all: index.php lights-out lights-out-init.service lights-out@.service diff --git a/lights-out.in b/lights-out.in index 144d7bd..e45a5c9 100644 --- a/lights-out.in +++ b/lights-out.in @@ -118,6 +118,15 @@ case "$1" in "$0" push power 0.1 || exit $? fi ;; + 'turn on') + check_argument_count 2 "$@" + value=$( + "$0" get power + ) || exit $? + if [ "${value}" -eq 0 ]; then + "$0" push power 0.1 || exit $? + fi + ;; *) >&2 printf 'unknown command "%s"\n\n' "$1" display_help -- cgit v1.2.3-54-g00ecf