diff options
| -rw-r--r-- | README | 2 | ||||
| -rw-r--r-- | script/uactivity/key/-20-toggle_demo | 5 | ||||
| -rw-r--r-- | script/vdr-uactivity | 8 |
3 files changed, 9 insertions, 6 deletions
@@ -1,6 +1,6 @@ This is a "plugin" for the Video Disk Recorder (VDR). -Written by: Dirk Heiser <email@host.dom> +Written by: Dirk Heiser <dirk-vdr@gmx.de> Project's homepage: http://projects.vdr-developer.org/projects/plg-uactivity diff --git a/script/uactivity/key/-20-toggle_demo b/script/uactivity/key/-20-toggle_demo index a3752fd..3ec3cfb 100644 --- a/script/uactivity/key/-20-toggle_demo +++ b/script/uactivity/key/-20-toggle_demo @@ -1,12 +1,14 @@ #!/bin/sh +# do not use names starting with [0-9][0-9] for data files FLAG="${4}/key/flag.$(basename ${0})" case "${1}" in startup) # create flag directory (using cache directory) mkdir -p "${4}/key/" - # delete flag + # delete flag (may leftover from previus vdr crash) + # kepp the flag if toggle state should be keep over vdr sessions rm -f "${FLAG}" ;; running) @@ -19,7 +21,6 @@ case "${1}" in else # here we do our "on" action logger -t "uactivity [key/$(basename ${0})]" "$(basename ${0}) on" - # do not use names starting with [0-9][0-9] for data files touch "${FLAG}" fi fi diff --git a/script/vdr-uactivity b/script/vdr-uactivity index 647ca76..c758939 100644 --- a/script/vdr-uactivity +++ b/script/vdr-uactivity @@ -38,9 +38,11 @@ case "${PARAM_REASON}" in commandline="${PARAM_ORGIN} ${PARAM_VALUE}" ;; key) - [ "${PARAM_VALUE}" != "_Setup" ] \ - && commandline="${PARAM_ORGIN} ${PARAM_VALUE}" \ - || commandline="${PARAM_ORGIN} ''" + if [ "${PARAM_VALUE}" != "_Setup" ]; then + commandline="${PARAM_ORGIN} ${PARAM_VALUE}" + else + commandline="${PARAM_ORGIN} ''" + fi ;; watchdog) commandline="${PARAM_ORGIN} ${PARAM_VALUE}" |
