Sundtek Support Forum
English => Sundtek MediaTV Pro (Europe) => Thema gestartet von: erdah am September 16, 2009, 05:40:38 Nachmittag
-
I'm using Tvheadend as streaming server. How to make sure Tvheadend starts after the driver is loaded?
-
you can autostart tvheadend by adding a corresponding entry to /etc/rc.local or to add an initscript to /etc/init.d/
rc.local is probably the easier way to do this.
-
Tvheadend is already starting automatically by initscript. The problem is that it starts before the driver is loaded. Because of that I have to manually restart Tvheadend after each reboot.
-
edit the tvheadend initscript
(this is just the example of the mediasrv script)
#! /bin/sh
### BEGIN INIT INFO
# Provides: mediasrv
# Required-Start: $local_fs $remote_fs
# Required-Stop: $local_fs $remote_fs
# Should-Start: $syslog
# Should-Stop: $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 1
# Short-Description: mediasrv startup script
# Description: this file initially starts the Sundtek Multimedia Framework
### END INIT INFO
add mediasrv to Required-Start: section of tvheadend
### BEGIN INIT INFO
# Provides: tvheadend
# Required-Start: $local_fs $remote_fs mediasrv
...
afterwards run:
update-rc.d tvheadend defaults
this should update the order when tvheadend will be started in /etc/rc[n].d/*
Scripts start with S[n]scriptname and are linked to /etc/init.d/scriptname, n indicates the index in which order the scripts sould be started. You might have to adjust this manually but this reply should give you a hint how to solve your request.
you might need to replace "tvheadend" with the name of your local tvheadend initscript.
-
Excellent, thanks!
-
Sorry to wake up an old thread but this problem (tvheadend starting before the usb tuner driver) can no longer be solved this way since the mediasrv init script is no longer deployed. How is mediasrv started now, and how to make sure it launches before tvheadend?
-
just create 2 files:
/usr/bin/tvheadend_restart.sh
#!/bin/bash
/etc/init.d/tvheadend restart
don't forget to chmod 777 /usr/bin/tvheadend_restart.sh
/etc/sundtek.conf
device_attach=/usr/bin/tvheadend_restart.sh
that will automatically restart tvheadend when you plug in the USB Stick
-
Thanks - that worked, even for bootup (my USB stick is always plugged in).
-
Thanks, this worked for me too!