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

Andrey Borzenkov arvidjaar at gmail.com
Fri Jun 27 01:31:42 PDT 2014


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