Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
1  
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. –  tsingyue Sep 5 '12 at 5:45
add comment

1 Answer

up vote 0 down vote accepted

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

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.