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/uactivity/activity/-20-switch_tv | |
| parent | f1472cb713f1f6d0e2200f7840effcf3fef88392 (diff) | |
| download | vdr-plugin-uactivity-7605ff2092460c8c4bfc4cd606bcbd1aeb97b578.tar.gz vdr-plugin-uactivity-7605ff2092460c8c4bfc4cd606bcbd1aeb97b578.tar.bz2 | |
addet started orgin
Diffstat (limited to 'script/uactivity/activity/-20-switch_tv')
| -rw-r--r-- | script/uactivity/activity/-20-switch_tv | 23 |
1 files changed, 20 insertions, 3 deletions
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 |
