[mythtv-users] auto-restarting mythbackend

Rich Freeman r-mythtv at thefreemanclan.net
Fri Oct 16 00:40:31 UTC 2015


On Thu, Oct 15, 2015 at 8:15 PM, Jerome Yuzyk <jerome at supernet.ab.ca> wrote:
> # Whether systemd will continue over-watch and restart on any halt
> #Restart=always
>
> Does this work?

Yes.

cat /etc/systemd/system/mythbackend.service.d/00rich.conf

[Unit]
After=mariadb-contain.service mariadb-wait-online at mariadb.service
nss-lookup.target
Wants=mariadb-wait-online at mariadb.service

[Service]
Nice=-5
IOSchedulingClass=1
Restart=always

(it is better to override units in /etc/systemd/system instead of
modifying the ones in /usr/lib, which will not be cfg-protected
anyway)

You won't need most of that.  You can just drop everything but
[Service] and Restart=always.  The scheduling stuff might be useful to
anybody, and the rest is just dependencies on my own units since my
database is inside a container.

Everything but the [Unit] stuff should be distro-agnostic as well.

--
Rich


More information about the mythtv-users mailing list