summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'media-tv/sundtek-tv/files/sundtek.initd')
-rw-r--r--media-tv/sundtek-tv/files/sundtek.initd16
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 $?
}