Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
2  
And the real problem is not I want less typing, it's that as time goes by, I can't remember the name of service a and b, because they are always invoked indirectly. – Yu Qing Sep 5 '12 at 5:45
up vote 2 down vote accepted

add StopWhenUnneeded=yes to a and b is a good idea I guess.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .