blob: 9faf7db2a5ca71d18645fafbda23449940ed6465 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
#!/sbin/openrc-run
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"
(
set_preload
/opt/bin/mediaclient --start=4
)
eend $?
}
stop() {
ebegin "Stopping $SVCNAME"
(
set_preload
timeout -k "${killtime:-15}" "${termtime:-15}" /opt/bin/mediaclient --shutdown
)
eend $?
}
|