diff options
Diffstat (limited to 'main/tvheadend/tvheadend.initd')
-rw-r--r-- | main/tvheadend/tvheadend.initd | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/main/tvheadend/tvheadend.initd b/main/tvheadend/tvheadend.initd index c244dd63ff..9b56313a8b 100644 --- a/main/tvheadend/tvheadend.initd +++ b/main/tvheadend/tvheadend.initd @@ -1,19 +1,23 @@ #!/sbin/runscript + depend() { need net } start() { - ebegin "Starting tvheadend" + ebegin "Starting tvheadend" start-stop-daemon --start \ - --user ${TVHUSER} \ - --exec ${TVHBIN} -- -C -f -c \ - ${TVHCONF} + --exec ${TVHBIN} -- \ + -C -f -u ${TVHUSER} \ + -c ${TVHCONF} eend $? } stop() { - ebegin "Stopping tvheadend" - start-stop-daemon --stop --quiet --name tvheadend --signal 2 + ebegin "Stopping tvheadend" + start-stop-daemon --stop --quiet \ + --retry TERM/30/KILL/5 \ + --pidfile /var/run/tvheadend.pid eend $? } + |