Kodi Community Forum
Want to ensure tvheadend is responding before launching xbmc? - Printable Version

Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: Linux (https://forum.kodi.tv/forumdisplay.php?fid=52)
---- Thread: Want to ensure tvheadend is responding before launching xbmc? (/showthread.php?tid=114208)



Want to ensure tvheadend is responding before launching xbmc? - Juge - 2011-11-08

I have a startup shell script. With following content:

#!/bin/sh
sudo /etc/init.d/tvheadend start
until ps -e | grep tvheadend; do
sleep 1
done
/usr/bin/xbmc &

Now it starts tvheadend and then xbmc but it is not enough, it complains about live tv application being active but none of the plugins being activated or so. It says "The PVR manager has been enabled without any enabled PVR add-on. Enable at least one add-on in order to use the PVR functionality."

So I think the tvheadend takes few seconds to start responding and my loop is not sufficient to ensure that there is an answer to xbmc request. So is there a better way to control this than checking tvheadend process - of course I can try to put yet another sleep in between but that is not elegant.


This forum uses Lukasz Tkacz MyBB addons.