[mythtv-users] udev and systemd requirements for MythTV on Ubuntu 20.04?
Jim Abernathy
jfabernathy at gmail.com
Tue Jul 28 22:14:04 UTC 2020
On 7/28/20 1:07 AM, Stephen Worthington wrote:
> On Mon, 27 Jul 2020 22:53:24 -0400, you wrote:
>
>> On 7/27/20 10:00 PM, Stephen Worthington wrote:
>>> On Mon, 27 Jul 2020 14:09:18 -0400, you wrote:
>>>
>>>
>>> You can have as many override files as you like. The only
>>> requirements for them is that the name end in .conf and that they have
>>> the right ownership and permissions. So if you like, you can have one
>>> for the ping, and one for the previously added stuff. Then you can
>>> give them names to tell you what each one is there for. They are used
>>> in collating sequence order. To see the end result, use this command:
>>>
>>> sudo systemctl cat mythtv-backend
>> That's very useful. Here are my current results:
>>
>> jim at mythbuntu:~$ sudo systemctl cat mythtv-backend
>> [sudo] password for jim:
>> # /lib/systemd/system/mythtv-backend.service
>> [Unit]
>> Description=MythTV Backend
>> Documentation=https://www.mythtv.org/wiki/Mythbackend
>> After=mysql.service network.target
>>
>> [Service]
>> User=mythtv
>> EnvironmentFile=-/etc/mythtv/additional.args
>> ExecStart=/usr/bin/mythbackend --quiet --syslog local7 $ADDITIONAL_ARGS
>> StartLimitBurst=10
>> StartLimitInterval=10m
>> Restart=on-failure
>> RestartSec=1
>>
>> [Install]
>> WantedBy=multi-user.target
>>
>> # /etc/systemd/system/mythtv-backend.service.d/mythtv-backend-override.conf
>> [Unit]
>> Wants=dev-dvb-adapter0-frontend0.device
>> After=dev-dvb-adapter0-frontend0.device
>> Wants=dev-dvb-adapter1-frontend0.device
>> After=dev-dvb-adapter1-frontend0.device
>> Wants=dev-dvb-adapter2-frontend0.device
>> After=dev-dvb-adapter2-frontend0.device
>> Wants=dev-dvb-adapter3-frontend0.device
>> After=dev-dvb-adapter3-frontend0.device
>>
>> After=NetworkManager-wait-online.service
>>
>>
>> #
>> /etc/systemd/system/mythtv-backend.service.d/mythtv-backend-wait-until-pingable.conf
>> [Unit]
>> Wants=local-network-pingable.service
>> After=local-network-pingable.service
> That looks good except for one thing - the fix to get mythbackend to
> shut down correctly. Due to the bug where one thread fails to shut
> down, without the fix mythbackend will continue to be running (doing
> nothing with only one thread left waiting on something). Eventually,
> after a long timeout (90 seconds I believe unless you have configured
> it), systemd will finally do a kill -9. So shutting down or rebooting
> the PC takes an extra 90 seconds. With the fix, shutdown of
> mythbackend is very rapid (one second?). Instructions for installing
> it can be found on this thread:
>
> https://lists.archive.carbon60.com/mythtv/users/627998
>
> Search for "mythbackendstop.sh".
Thanks to all for the help. The advice must have been good because I
just blew away my old mythbackend on 18.04 and install v31 on a fresh
install of Ubuntu 20.04 and restored the database. That was easy it's
all the little stuff that takes time to do if you remember where you
learned to do them. That's why I created a new blog with my
instructions to help me the next time Ubuntu LTS changes to the next big
release. FYI, my old system used MariaDB and I successfully use the
daily backend when I restored the database onto the new Mythtv v31 on
20.04 that defaults to MySQL 8
In case you want to help me with typos or mistakes I've got a first
draft at:
https://mythtvinstall.blogspot.com/2020/07/combined-mythtv-v31-media-system-and.html
Once it's reasonable clean, I put a post in the MythTV Forum so newbies
can have one more data point to get started.
Jim A
More information about the mythtv-users
mailing list