[mythtv-users] BE3 - Issues with installation and database

Stephen Worthington stephen_agent at jsw.gen.nz
Sat May 25 12:42:15 UTC 2019


On Sat, 25 May 2019 23:24:56 +1200, you wrote:

>To install the full fix for starting mythbackend only after the
>network is up, the first thing to do is to download this file from my
>web server:
>
>sudo su
>cd /usr/local/bin
>wget -c http://www.jsw.gen.nz/mythtv/wait-until-pingable.py
>chown root:root wait-until-pingable.py
>chmod u=rwx,g=rx,o=rx wait-until-pingable.py
>
>Now test wait-until-pingable.py - find the IP address or DNS name of
>something on your network that is pingable and will always be
>available.  If your Ethernet switch is pingable, that is the best
>option, otherwise your router is usually pingable:
>
>sudo wait-until-pingable.py <IP address> 5; echo $?
>
>That will return immediately and display a 0 result if the ping
>succeeds.  If the ping fails, it will timeout after 5 seconds and
>display a non-zero result.
>
>Then you need to create a systemd override file for mythbackend:
>
>systemctl edit mythtv-backend
>
>That will start your default editor (usually nano).  Paste this text
>into it, (with <IP address> changed to an IP address that you tested
>above that worked):
>
>[Service]
>ExecStartPre=/usr/local/bin/wait-until-pingable.py <IP address> 30
>
>What that does is to tell systemd to run the wait-until-pingable.py
>program before it tries to start mythbackend.  Systemd will wait until
>wait-until-pingable.py stops before it will go on to start
>mythbackend.  The parameters on the wait-until-pingable.py command
>line are an IP address for it to ping, and a timeout in seconds, so
>mythbackend will eventually be started even if the ping fails.  The
><IP address> can also be a DNS name, in which case it also has to wait
>for DNS lookups to be working.

Please ignore this - I forgot that wait-until-pingable.py requires to
be run as root, and mythbackend is run as user mythtv, so the above
does not work.  I will post a working method of doing this later.


More information about the mythtv-users mailing list