tvheadend and hdhomerun

  Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
realslacker Offline
Junior Member
Posts: 2
Joined: Apr 2012
Reputation: 0
Post: #1
So, I was having a bunch of issues getting the dvbhdhomerun drivers to load before tvheadend started on xbmcbuntu, so then I would need to go in and restart tvheadend or reboot and then restart tvheadend. It was totally bumming me out!

So here's my solution in case anyone else is having troubles.

First, remove dvbhdhomerun-utils and tvheadend from startup:
Command Line Wrote:user@xbmc:~$ sudo update-rc.d -f dvbhdhomerun-utils remove
user@xbmc:~$ sudo update-rc.d -f tvheadend remove

Now create a new script named "start-tvheadend-right.sh" in /etc/init.d containing the following:
Code:
#!/bin/bash
service dvbhdhomerun-utils start
while [ ! -d /dev/dvb ]
do
        sleep 1
done
service tvheadend start

What this script does is start dvbhdhomerun-utils, then it checks every second for the dvb driver to load... when it loads it starts tvheadend. Yay!

Wait! You aren't done yet! Now you need to make the script executable and tell it to auto-start:
Command Line Wrote:user@xbmc:~$ sudo chmod +x /etc/init.d/start-tvheadend-right.sh
user@xbmc:~$ sudo update-rc.d -f start-tvheadend.sh start 99 2 3 4 5 .

Rebooting should now make tvheadend start after the drivers are loaded. Good luck!
find quote
himayv Offline
Junior Member
Posts: 11
Joined: Dec 2010
Reputation: 0
Post: #2
I just wanted to say thank you for this. I was tearing my hair out trying to get TVHeadEnd to work, and once I implemented your fix, everything worked PERFECTLY on my Acer Aspire Revo 1600 and HDHomeRun. Without this I would have given up on XBMC as a PVR. Thank you!
(This post was last modified: 2012-06-22 18:17 by himayv.)
find quote
realslacker Offline
Junior Member
Posts: 2
Joined: Apr 2012
Reputation: 0
Post: #3
I'm glad it helped!
find quote
oneadvent Offline
Fan
Posts: 405
Joined: May 2011
Reputation: 0
Post: #4
Thanks for this, best I could do was change the startup number, this is much more elegant.
find quote
crp724 Offline
Junior Member
Posts: 2
Joined: Oct 2009
Reputation: 0
Post: #5
thanks so much for this script!

Just to clarify the last command should be

Code:
user@xbmc:~$ sudo chmod +x /etc/init.d/start-tvheadend-right.sh
user@xbmc:~$ sudo update-rc.d -f start-tvheadend-right.sh start 99 2 3 4 5 .
(This post was last modified: 2012-09-18 22:06 by crp724.)
find quote