Forum
starting a program in xbmc-preload.conf - Printable Version

+- Forum (http://forum.xbian.org)
+-- Forum: Software (/forum-6.html)
+--- Forum: Testing & Experimental (/forum-21.html)
+--- Thread: starting a program in xbmc-preload.conf (/thread-1218.html)



starting a program in xbmc-preload.conf - markosjal - 10th Aug, 2013 10:08 PM

I have been battling with atvclient autostarting so I thiought i could load it in xbmc-preload.conf, especially since I only need it when xbmc is running.

How do I add a program to xbmc-preload.conf?


RE: starting a program in xbmc-preload.conf - belese - 10th Aug, 2013 10:27 PM

(10th Aug, 2013 10:08 PM)markosjal Wrote:  I have been battling with atvclient autostarting so I thiought i could load it in xbmc-preload.conf, especially since I only need it when xbmc is running.

How do I add a program to xbmc-preload.conf?

you can create its own upstart job that start atvclient when xbmc start.
for exemple, i've done a service and mk01 do a init file
https://github.com/mk01/xbian-package-upstart-xbmc-bridge/blob/master/content/etc/init/xbian-xbmc-bridge.conf

looks specially the start on, stop on command.


RE: starting a program in xbmc-preload.conf - mk01 - 13th Aug, 2013 03:37 AM

(10th Aug, 2013 10:08 PM)markosjal Wrote:  I have been battling with atvclient autostarting so I thiought i could load it in xbmc-preload.conf, especially since I only need it when xbmc is running.

How do I add a program to xbmc-preload.conf?

xbmc-preload is waiting for defined processes to start up. but will not start them alone - it is meant for services which does have their startup scripts, but are taking longer to start or are originally started much later in run levels.

so as Belese is telling you, use upstart conf file. it's easy, the simplest would be:
Code:
start on starting xbmc
stop on stopped xbmc

exec atvclient

and save it under /etc/init/avclient.conf. starting xbmc / stopped xbmc is for case avclient does not need xbmc started for it's function. it will be started before xbmc will start.

if it would be dependent, then change starting xbmc to started xbmc.

mk