[systemd-devel] How to properly write an "umbrella" unit

Michael Biebl mbiebl at gmail.com
Wed Jul 22 11:28:33 PDT 2015


2015-07-22 19:15 GMT+02:00 Lennart Poettering <lennart at poettering.net>:
> On Tue, 21.07.15 13:43, Marc Haber (mh+systemd-devel at zugschlus.de) wrote:
>> Can I write my nifty.target as a service? I have seen in this case
>> nifty.service files with Exec=/bin/true to basically create a no-op
>> service, but that's ugly.
>
> That's a hack. A target is for grouping things, they basically are
> services without processes attached to them. You really should use
> targets for this, and not misuse services.

Afaik, there is no way to have a .target reloaded and that reload
request propagated to all services in that target.

Say you have foo.target consisting of  bar.service and baz.service,
how can you achieve that
systemctl reload foo.target propagates that reload request to {bar,baz}.service?

Michael
-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?


More information about the systemd-devel mailing list