[mythtv-users] Delaying frontend start

Ian Clark mrrooster at gmail.com
Thu Feb 12 11:44:15 UTC 2009

2009/2/12 Jan Schneider <jan at horde.org>

> Hi,


> I would like to know if there some built-in means to delay the start of
> mythfrontend, or to set a higher timeout when trying to connect to the
> backend.

I don't think there is as standard.

 [snip startup info]

I start mythbackend from rc.local, and just after I've started the backend I
have the following:

until /home/ian/bin/ismythup.pl;do sleep 1;done

Where /home/ian/bin/ismythup.pl is the following:


use strict;
use IO::Socket;

my $host = 'localhost';
my $port = 6543;
my $sock;

while (! ($sock = new IO::Socket::INET(
                   PeerAddr => $host,
                   PeerPort => $port,
                   Proto    => 'tcp') )) {select undef,undef,undef,5;exit 1}

print $sock "20      MYTH_PROTO_VERSION 8\n";
if (<$sock>=~/13      REJECT[]:[]/) {
        exit 0;

exit 1;

Which seems to do the job.

I use this on 0.21.fixes, hope that's some use. :)

Sometimes it takes a few more minutes before it's usable, but it stops
mythfrontend from complaining it can't talk to the backend.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mythtv.org/pipermail/mythtv-users/attachments/20090212/bd08a40c/attachment.htm>

More information about the mythtv-users mailing list