[systemd-devel] scheduling services first during shutdown/reboot

Olaf Hering olaf at aepfle.de
Wed Feb 12 13:35:45 UTC 2025


What is the proper way to run a service as the very first unit when the
system goes down? I want to run it before systemd stops active sessions
with "Stopping Session N of User $user...".

It seems that "After=session-N.scope" does have the desired effect,
but I may have to list every possible value of N, to not miss anything.

There is nothing obvious mentioned in systemd.special.


Thanks,
Olaf
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: Digitale Signatur von OpenPGP
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20250212/851dc138/attachment.sig>


More information about the systemd-devel mailing list