diff options
author | Martin Väth <martin@mvath.de> | 2015-10-21 18:39:35 +0200 |
---|---|---|
committer | Martin Väth <martin@mvath.de> | 2015-10-21 18:39:35 +0200 |
commit | 823341961fd7b0a6383afe739bbc7cd4765ae6f4 (patch) | |
tree | 2ed3e99a15ad3e62190c5b2bffabcfea9e74b65d /media-tv/sundtek-tv/files/sundtek.initd | |
parent | app-shells/zsh-syntax-highlighting: Version bump (diff) | |
download | mv-823341961fd7b0a6383afe739bbc7cd4765ae6f4.tar.gz mv-823341961fd7b0a6383afe739bbc7cd4765ae6f4.tar.bz2 mv-823341961fd7b0a6383afe739bbc7cd4765ae6f4.zip |
media-tv/sundtek-tv: Add timeout to openrc init
Diffstat (limited to 'media-tv/sundtek-tv/files/sundtek.initd')
-rw-r--r-- | media-tv/sundtek-tv/files/sundtek.initd | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/media-tv/sundtek-tv/files/sundtek.initd b/media-tv/sundtek-tv/files/sundtek.initd index 315da43e..fb374f43 100644 --- a/media-tv/sundtek-tv/files/sundtek.initd +++ b/media-tv/sundtek-tv/files/sundtek.initd @@ -4,14 +4,26 @@ description="sundtek TV mediaclient" #command=/opt/bin/mediasrv #command_args="-d --pluginpath /opt/bin" +set_preload() { + yesno ${preload:-NO} || return 0 + LD_PRELOAD=${preload_lib:-/usr/lib}/libmediaclient.so${LD_PRELOAD:+ }${LD_PRELOAD-} + export LD_PRELOAD +} + start() { ebegin "Starting ${SVCNAME}" - /opt/bin/mediaclient --start=4 + ( + set_preload + /opt/bin/mediaclient --start=4 + ) eend $? } stop() { ebegin "Stopping ${SVCNAME}" - /opt/bin/mediaclient --shutdown + ( + set_preload + timeout -k "${killtime:-15}" "${termtime:-15}" /opt/bin/mediaclient --shutdown + ) eend $? } |