[systemd-devel] Systemd killed processes of custom services instead of graceful shutdown
Andrei Borzenkov
arvidjaar at gmail.com
Fri Jun 19 16:50:21 UTC 2020
18.06.2020 10:07, Kamal Rathi пишет:
>
> Now I am more eager to know if is it possible to run anything before it
> kills users processes at shutdown / reboot / halt.
User processes run either as part of user session or as part of user
service. The former is session-xxx.scope, the latter is
user at UID.service. You could add Before=your.service to user at .service
template to make sure your.service is stopped first. Current version of
systemd allows creation of drop-ins in session-.scope.d as well to add
dependency to all session scopes. Check systemd.unit man page.
More information about the systemd-devel
mailing list