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

James Abernathy jfabernathy at gmail.com
Wed Dec 19 16:39:55 UTC 2018

> On Dec 19, 2018, at 10:45 AM, James Abernathy <jfabernathy at gmail.com> wrote:
>>> I think for safety sake, I'd use the full-internet.service and
>>> wait-until-pingable.py approach. But since wait-until-pingable.py waits
>>> for what it wants, the "After=NetworkManager-wait-online.service" could
>>> really be anything network related because the script waits, right??
>>> -------------------------------------full-internet.service------------------------
>>> [Unit]
>>> Description=Wait for full internet service to be available including DNS
>>> After=NetworkManager-wait-online.service
>>> [Service]
>>> Type=simple
>>> ExecStartPre=/usr/local/bin/wait-until-pingable.py my.hdhomerun.com 30
>>> ExecStart=/bin/true
>>> [Install]
>>> WantedBy=multi-user.target
>> Yes, if you do not want to have NetworkManager-wait-online.service
>> enabled, or are not using NetworkManager, you could just have
>> full-internet.service run After=network.target.  That way, with the
>> next update of wait-until-pingable.py, you would also get a log
>> message that tells you how long it had to wait for the network to
>> complete coming up.
> Since my production system only uses Ubuntu Server and static IPs, there is no need for NetworkManager. So after network.target would be an improvement. I'll test all this some more.
> Jim A

So the first test is to start over and see what’s installed by default.  I installed Ubuntu Server 18.04.1 with no snaps or packages.  I took the defaults on everything. Since my eno1 mac address is in my router as fixed to an IP, I went with the default DHCP and got the right address from my router.

1) NetworkManager is not installed 
2) systemd-networkd-wait-onine.service is enabled and active
3) network.target is enabled and active

I’ll install mythtv-backend with mythhdhrrecorder and see what we get with the different delaying tactics for mythtv-backend.service

Jim A

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20181219/61b8f312/attachment.html>

More information about the mythtv-users mailing list