[systemd-devel] Systemd killed processes of custom services instead of graceful shutdown

Reindl Harald h.reindl at thelounge.net
Mon Jun 15 08:18:19 UTC 2020



Am 15.06.20 um 10:01 schrieb Kamal Rathi:
> Hi Team,
> 
> I have two services which are dependent on each other and are working
> fine at boot up but at shutdown / reboot , the processes get killed as
> shutdown got initated.
> 
> Services are running fine in particular order but processes got killed
> .I have enabled lingering on both users and changed confgiuration in
> logind.conf to KillUserProcesses=no but still issue is same 
> 
> let me know if my configuration is faulty or what I have missed so that
> shutdown should be graceful for services and processes will be
> shutdown with systemd custom service?
> 
> I want first rdbms.service should be called and get process stopped
> before grid.services (it seems systemd are killing user.slices
> processes) and in startup-inverse should be followed .
> Please help

i would start with thinking about why the useless "RemainAfterExit=yes"
is in a service with type=simple

this is nice fot type=oneshot but makes no sense here when you want to
order things running long living processes

RemainAfterExit=
Takes a boolean value that specifies whether the service shall be
considered active even when all its processes exited. Defaults to no.


More information about the systemd-devel mailing list