[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#727708: init multiple instances of a daemon



Tollef Fog Heen <tfheen@err.no> writes:
> ]] Russ Allbery 

>> It looks like both upstart and systemd don't provide direct mechanisms
>> to manage all instances.  The upstart cookbook recommends getting a
>> list of all active services and extracting the list of instances of a
>> particular service from that, and then acting on them in a loop.
>> systemd's docs (at least that I can find) don't have a similar recipe,
>> but systemd has all the tools required to do the same thing.

> The ideomatic systemd way seems to be to use a target for it.  Take a
> look at how getty.target works, for instance.

What should I be looking at?  I see the target, and that the getty
template delcares a Before relationship on it, but some quick searches are
failing me in understanding what that means in terms of functionality.  I
get how that affects dependencies, in that something that wants to ensure
getty is set up can just declare a dependency on the getty target, but I'm
not sure what that means for other functionality.

Does that mean that you can do a systemctl restart getty and have it
restart all of the services spawned from the getty template?

-- 
Russ Allbery (rra@debian.org)               <http://www.eyrie.org/~eagle/>


Reply to: