[systemd-devel] Restart of Target should restart all services that are wanted by that target and have StopWhenUnneeded=true

Michael Seiwald Michael.Seiwald at ith-icoserve.com
Fri Jun 27 02:09:49 PDT 2014


With PartOf it works perfectly. Thanks!

-----Ursprüngliche Nachricht-----
Von: Andrey Borzenkov [mailto:arvidjaar at gmail.com] 
Gesendet: Freitag, 27. Juni 2014 10:32
An: Michael Seiwald
Cc: systemd-devel at lists.freedesktop.org
Betreff: Re: [systemd-devel] Restart of Target should restart all services that are wanted by that target and have StopWhenUnneeded=true

On Fri, Jun 27, 2014 at 9:56 AM, Michael Seiwald <Michael.Seiwald at ith-icoserve.com> wrote:
> Hi,
>
> I have a target unit that acts as a collection unit for several service units. The service units all have a WantedBy directive pointing to the target unit as well as StopWhenUnneeded set to true. When I stop the target the service units stop as well which ist the expected behaviour. When I restart the target the services are unaffected. Is this the wanted behaviour or a bug? Is there a better way to achieve this?
>

Yes, this is expected. You probably want to make service units PartOf target unit.


More information about the systemd-devel mailing list