summaryrefslogtreecommitdiff
path: root/script
diff options
context:
space:
mode:
Diffstat (limited to 'script')
-rw-r--r--script/uactivity/key/-20-toggle_demo5
-rw-r--r--script/vdr-uactivity8
2 files changed, 8 insertions, 5 deletions
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}"