How to stop a group of systemd custom services
Posted
by
tsingyue
on Super User
See other posts from Super User
or by tsingyue
Published on 2012-09-05T01:34:20Z
Indexed on
2012/09/05
3:40 UTC
Read the original article
Hit count: 505
systemd
I wrote three service units, say a.service b.service and c.service. C requires and runs after b, b requires and runs after a, so when I execute "systemctl start c.service", all three of them will be launched one by one. But when I want to stop all of them, I have to execute "systemctl stop a.service b.service c.service". Is there any other way to stop all of them with less typing?
I know with "Bindto=" I can use "systemctl stop a.service" to stop all of them, but what if I got c Bindto a and b, while a and b have no required relationship to each other?
© Super User or respective owner