[systemd-devel] Is there any way to stop services in cgroup?

Andrey Borzenkov arvidjaar at gmail.com
Thu Jan 2 11:19:54 PST 2014


В Чт, 02/01/2014 в 17:43 +0200, Mantas Mikulėnas пишет:
> On Thu, Jan 2, 2014 at 4:02 PM, Tony Seo <tonyseo7 at gmail.com> wrote:
> > Hello.
> > I wonder that systemd has a method to stop all services in specific cgroup.
> > Actually, I have looked for a method to stop all services as the same time.
> > I have searched many manual in systemd site.
> > I couldn't find any method to stop all services which I want to stop.
> 
> If you're trying to stop all instances of a service, systemd-git
> recently had wildcard support added, so `systemctl stop
> sshd@*.service` will now work.
> 
> Otherwise, use a .target and BindsTo.
> 
> 

PartOf is probably more appropriate here. But the practical problem is
that both must be specified for each unit explicitly, which simply does
not scale for future unknown services.



More information about the systemd-devel mailing list