[systemd-devel] Shutdown a specific service in systemd shutdown

Andrei Borzenkov arvidjaar at gmail.com
Wed May 25 07:50:58 UTC 2016


On Wed, May 25, 2016 at 9:59 AM, Bao Nguyen <baondt at gmail.com> wrote:
> Hi,
>
> Thanks for all your comments.
>
> How do you think if we create a custom target to include all remaining
> services, then add this target to the dependency After= of the specific
> services. This way can make the specific stop before the services in the
> target when the system shutdowns?
>

Keyword here is "all remaining services". If you have fixed number of
services that are known in advance then yes, you can of course
configure arbitrary dependencies between them and order them exactly
as you need.

What is asked at regular interval is doing the same for arbitrary
number of services unknown in advance. This is not possible.


More information about the systemd-devel mailing list