[mythtv-users] delaying backend startup until the network is up

James Abernathy jfabernathy at gmail.com
Tue Dec 18 14:50:41 UTC 2018


> 
> Last night I wrote a "wait-until-pingable.py" program that will wait
> until a specified address can be looked up and pinged, or a specified
> timeout is reached:
> 
> http://www.jsw.gen.nz/mythtv/wait-until-pingable.py
> 
> Use the -h option from the command line to get help on its options.
> 
> Warning: This is alpha software - it has not been tested in real life
> yet, just from my command line.  It does not support IPv6 yet, and I
> also want to add a log message that tells how long it needed to wait
> for its first ping response.  But it should work well enough to do the
> job for now.
> 
> I would recommend putting it in /usr/local/bin and using it by
> changing the ExecStartPre line in the full-internet.service file to:
> 
> ExecStartPre=/usr/local/bin/wait-until-pingable.py my.hdhomerun.com 30
> 
> I will update the file on my web server when I get IPv6 working and
> add the log message.
> ________________________

I implemented your wait-until-pingable.py in my full-intenet.service and it worked of course.

There must have been a very closely missed timing that made this necessary in the first place. I was checking the syslog and noticed that Network-Manager-Wait-Online started before, but in the same second as wait-until-pingable.  Also Mythtv Backend started after wait-until-pingable, but in the same second. mythhdhrrecorder started the devicename 0 tuner only 2 seconds later.

Jim A



More information about the mythtv-users mailing list