On Mon, 27.06.16 08:25, Paul Menzel ([email protected]) wrote:
> Dear systemd folks, > > > having a template for a service unit like `[email protected]`, and > starting several services from it, is there a way, to let another > service unit require all services started from that template? Well, what does "all instances" even mean? Note that instances can be instantiated dynamically. i.e. without having a unit file [email protected] on disk you can simply by having [email protected] on disk make "systemctl start [email protected]" work. Hence, if you want some other service to have deps onto "all" instances of [email protected], then this would mean you'd have to add deps for really all theoretically possible instance strings, and those are quite a few... Now, what would make more sense if by "all" you just mean "all *enabled* instances". if that's what you mean then RequiredBy= in [Install] should do what you need. Alternatively, if by "all" you mean "all *running" instances", then you could use PartOf= in the instance unit file instead of Requires=. The effective difference is that only stops are propagated, but not starts. Hope this makes some sense, Lennart -- Lennart Poettering, Red Hat _______________________________________________ systemd-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/systemd-devel
