diff options
author | Keine_Ahnung <no@mail.com> | 2013-02-01 16:21:12 +0100 |
---|---|---|
committer | Keine_Ahnung <no@mail.com> | 2013-02-01 16:21:12 +0100 |
commit | 7605ff2092460c8c4bfc4cd606bcbd1aeb97b578 (patch) | |
tree | 1b98ac6c9425bade98a3f0afc9c9b6a489820302 /script | |
parent | f1472cb713f1f6d0e2200f7840effcf3fef88392 (diff) | |
download | vdr-plugin-uactivity-7605ff2092460c8c4bfc4cd606bcbd1aeb97b578.tar.gz vdr-plugin-uactivity-7605ff2092460c8c4bfc4cd606bcbd1aeb97b578.tar.bz2 |
addet started orgin
Diffstat (limited to 'script')
-rw-r--r-- | script/uactivity/activity/-10-syslog_demo | 9 | ||||
-rw-r--r-- | script/uactivity/activity/-20-switch_tv | 23 |
2 files changed, 29 insertions, 3 deletions
diff --git a/script/uactivity/activity/-10-syslog_demo b/script/uactivity/activity/-10-syslog_demo index 8c16823..c1d98ec 100644 --- a/script/uactivity/activity/-10-syslog_demo +++ b/script/uactivity/activity/-10-syslog_demo @@ -10,6 +10,15 @@ case "${1}" in logger -t "uactivity [activity/$(basename ${0})]" "CacheDirectory: ${4}" logger -t "uactivity [activity/$(basename ${0})]" "ResourceDirectory: ${5}" ;; + started) + logger -t "uactivity [activity/$(basename ${0})]" "activity started" + [ "${2}" = "true" ] \ + && logger -t "uactivity [activity/$(basename ${0})]" "status \"user active\"" \ + || logger -t "uactivity [activity/$(basename ${0})]" "status \"user inactive\"" + logger -t "uactivity [activity/$(basename ${0})]" "ConfigDirectory: ${3}" + logger -t "uactivity [activity/$(basename ${0})]" "CacheDirectory: ${4}" + logger -t "uactivity [activity/$(basename ${0})]" "ResourceDirectory: ${5}" + ;; shutdown) logger -t "uactivity [activity/$(basename ${0})]" "activity shutting down" [ "${2}" = "true" ] \ diff --git a/script/uactivity/activity/-20-switch_tv b/script/uactivity/activity/-20-switch_tv index f014e6f..7059e1f 100644 --- a/script/uactivity/activity/-20-switch_tv +++ b/script/uactivity/activity/-20-switch_tv @@ -1,7 +1,24 @@ #!/bin/sh -([ "${2}" = "true" ] && [ "${1}" != "shutdown" ]) \ - && irsend -d /var/run/lirc/ya_usbir SEND_ONCE TP av \ - || irsend -d /var/run/lirc/ya_usbir SEND_ONCE TP off +switch_tv(){ + [ "${1}" = "on" ] && irsend -d /var/run/lirc/ya_usbir SEND_ONCE TV_REMOTE on + [ "${1}" = "off" ] && irsend -d /var/run/lirc/ya_usbir SEND_ONCE TV_REMOTE off +} + + +case "${1}" in + startup) + true + ;; + started) + [ "${2}" = "true" ] && switch_tv on + ;; + shutdown) + switch_tv off + ;; + running) + [ "${2}" = "true" ] && switch_tv on || switch_tv off + ;; +esac exit 0 |