[systemd-devel] require=? to prevent premature session termination

Reindl Harald h.reindl at thelounge.net
Sat Oct 6 17:40:10 UTC 2018



Am 05.10.18 um 18:07 schrieb Ralf Sieger:
> Hm, according to the docs this is not the case:
> "if a unit is configured with |After=| on another unit, the former is
> stopped before the latter if both are shut down "
> I read this as:
> a has After=b
> then the start ording should be:
> 1. start b
> 2. start a
> and thus the reverse on shutdown should be
> 1. stop a
> 2. stop b
> Which is what I want. I wannt to be stopped first.

obviously no

> I have only the problem that existing ssh sessions get terminated before
> the stop reaches my service.
> SSH itself keeps runnign and I can login

when you start "After=ssh.service" it implies that "ssh.service" is
terminated before your service at shutdown - it's really that simple


More information about the systemd-devel mailing list