[mythtv-users] systemd & mythbackend
R. G. Newbury
newbury at mandamus.org
Mon Jun 6 22:20:13 UTC 2011
On 06/05/2011 07:01 AM, Udo van den Heuvel wrote:
> # cat mythbackend.service
> [Unit]
> Description=mythbackend daemon
> After=mysqld.service
>
> [Service]
> EnvironmentFile=/etc/sysconfig/mythbackend
> ExecStart=/usr/bin/mythbackend --daemon --user mythtv --logfile
> /var/log/mythtv/mythbackend.log --pidfile /var/run/mythbackend.pid
> PIDFile=/var/run/mythbackend.pid
> Type=forking
>
> [Install]
> WantedBy=multi-user.target
>
>
> I put it in /lib/systemd/system. Should it go in /etc/systemd/user instead?
>
> After a `systemctl --system daemon-reload` stuff started to work.
>
Udo,
Thanks for this. From reading the systemd originators blog it appears
that /etc/systemd/user is for 'user' services while /lib... is for
actual system services. Since we *usually* want the BE to run for
'everyone' and it often runs are root, then maybe /lib is the correct place.
But it appears it would not make much difference on a dedicated mythbox.
Might be differences on multi-use boxes however.
That blog also points out that the 'elegant' method of running a servie
is to have it talk to the system through dbus (instead of forking) so
that the system 'knows' which PID is the parent of any child. However
that requires knowing the 'name' by which dbus knows things...but how
would it know about mythbackend at all?
I've never figured out what half the stuff running as threads are or
what they do! And changing to LXDE exposes a completely different set of
names!
The mysteries are never actually revealed...just new ones exposed.
Geoff
More information about the mythtv-users
mailing list