[mythtv-users] systemd foo

Stephen Worthington stephen_agent at jsw.gen.nz
Wed Jan 10 03:31:31 UTC 2024

On Wed, 10 Jan 2024 06:13:25 +0800, you wrote:

>Multiple Wants on same line and enable again got it working. (many failed tries)
>Description=MythTV backend service
>Wants=store.mount dev-dvb-adapter0.mount dev-dvb-adapter3.mount
>After=store.mount dev-dvb-adapter3.mount dev-dvb-adapter0.mount mysql.service
>ExecStart=/usr/local/bin/mythbackend --logpath /var/log/mythtv $MYTHBACKEND_OPTIONS

dev-dvb-adapter<x>.mount is wrong.  It should be
dev-dvb-adapter<x>-frontend0.device.  To make this work, you need to
add these udev rules:

root at mypvr:/etc/udev/rules.d# cat 99-tuner.rules
# Create systemd device units for capture devices
SUBSYSTEM=="video4linux", TAG+="systemd"
SUBSYSTEM=="dvb", TAG+="systemd"
SUBSYSTEM=="firewire", TAG+="systemd"

The "dvb" one is the one you need, but it is best to add them all just
in case.

The naming is done the same way as the .mount names:

Device path: /dev/dvb/adapter0/frontend0
Becomes:     dev-dvb-adapter0-frontend0.device

Having those device names wrong will likely be causing a long timeout
(60 seconds?) before mythbackend is started.

Make sure you always remember to do:

sudo systemctl daemon-reload

every time you make any changes to the systemd files.  Otherwise the
changes will not be seen.

More information about the mythtv-users mailing list