[systemd-devel] service kills application differently on shutdown vs on stop

Reindl Harald h.reindl at thelounge.net
Mon Dec 14 16:26:32 UTC 2020



Am 14.12.20 um 17:22 schrieb John:
> Thank you for the reply, Colin.  I found that to be the case[1].  I
> think everything is working as expected now.  I still have quirks with
> the kodi-x11.service since it has to call xinit as well as the kodi
> binary but I do not know of a cleaner way to do it unless there is a
> multiple unit solution to be had (one for xserver and another for
> kodi).

targets and dependencies maybe are your friend

[root at srv-rhsoft:~]$ cat /etc/systemd/system/vmware-guest.target
[Unit]
Description=VMware Guest Group
After=vmware.service vmware-modules.service vmware.target 
vmware-vmnet.service network-up.service
Requires=vmware.service vmware-modules.service vmware.target 
vmware-vmnet.service
Wants=network-up.service
Wants=guest-arrakis.service
Wants=guest-testserver.service
Wants=guest-esxi.service

[Install]
WantedBy=multi-user.target

> 1. https://github.com/graysky2/kodi-standalone-service/commit/909f274d6eaf011add6326b28b42fecb9123c7df
> 
> On Mon, Dec 14, 2020 at 11:12 AM Colin Guthrie <gmane at colin.guthr.ie> wrote:
>>
>> John wrote on 14/12/2020 12:52:
>>> Note that it looks
>>> like I will need to add some udev rules to allow the kodi user to
>>> shutdown the system which it could do when the PAMName=login was
>>> present.
>>
>> Just a small hint, but it might be policykit rules you need to add
>> rather than udev rules.


More information about the systemd-devel mailing list