[mythtv-users] Fwd: Re: mythfilldatabase run manually

Jim Abernathy jfabernathy at gmail.com
Thu Jan 9 12:57:26 UTC 2020


On 09/01/2020 11:32, Jim Abernathy wrote:
>
> On 1/8/20 9:27 PM, Stephen Worthington wrote:
>> On Wed, 8 Jan 2020 14:30:03 -0500, you wrote:
>>
>>> I have a mobile combo mythtv FE/BE on a RPi4 in my RV.  So it only 
>>> have an internet connection when I turn my phone into a hotspot and 
>>> the wireless AP/router bridge reestablishes a connection to the 
>>> hotspot. As a result when mythfilldatabase runs it usually doesn’t 
>>> succeed.
>>>
>>> So  what I do now is:
>>> 1.  Turn on phone hotspot.
>>> 2.  Open terminal and ‘sudo su mythtv’ then ‘mythfilldatabase’
>>> 3.  Turn off phone hotspot.
>>>
>>> Anyone have a more automated way of doing this or is this the best I 
>>> can hope for??
>>>
>>> Jim A
>> It is possible to get a script to run when a network connection comes
>> up - see /etc/network/if.up.  The system uses this, but it is possible
>> to add your own scripts also.  I presume an RPi also works this way -
>> it is a Debian and Debian based thing.  So you could have
>> mythfilldatabase run when a network connection comes up the first time
>> each day after the time it would normally be run.
>
> After more research I see that maybe setting a systemd service is best 
> and have that service run after network-online.target. Now I just need 
> to see if I can make a service that:
>
> 1. runs everything the network comes up.
>
> 2. only runs mythfilldatabase once per day.
>
Actually, I believe that 'anacron' is designed for just this situation.

-- 

Mike Perkins


I can see how anacron will run a script once a day, but not sure how I 
connect that with only with the network is up and running, since the 
hotspot network connection comes and goes.

Jim A



More information about the mythtv-users mailing list