diff options
author | Erich Eckner <git@eckner.net> | 2021-01-30 20:57:50 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2021-01-30 20:57:50 +0100 |
commit | 91655f4486c47fb9f837acc9cb0e8842abf38fde (patch) | |
tree | 271a4bf6d94d1ce4d6430db83bc281eda64e1fae | |
parent | ba7b8145c7042eb6f56e11ddc2f497f0be3ec19e (diff) | |
download | raspi-lights-out-91655f4486c47fb9f837acc9cb0e8842abf38fde.tar.xz |
neue Version: 0.1v0.1
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | lights-out.in | 9 |
2 files changed, 10 insertions, 1 deletions
@@ -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 |