[systemd-devel] Running a set of group isolated from other services?
Lennart Poettering
lennart at poettering.net
Sat Apr 29 17:27:34 UTC 2017
On Wed, 26.04.17 11:05, Benno Fünfstück (benno.fuenfstueck at gmail.com) wrote:
> Hi,
>
> I have the problem that I want to run a set of services that are isolated
> from the other services. In particular, I'd like to:
>
> * share some environment variables between these services, that aren't
> available for services outside the group
You can share a common environment file between them and use EnvironmentFile=-
> * be able to stop all the services in the group and wait for proper
> shutdown
Usually you'd create a target unit for that and use PartOf=.
> * (would be nice) load services for the group from a different directory
> than the default one
This is not supported. ATM you cannot extend the unit file search path
locally. It's built into the binary. (Well, to be entirely honest you
can override it with an env var, but it's hard to do for PID 1 and
mostly relevant for debugging)
> * (would be nice) be able to add transient services to the group with
> systemd-run
if you set up such a target unit it doesn't matter whether the
services that are linked to it are transient or persistent.
Lennart
--
Lennart Poettering, Red Hat
More information about the systemd-devel
mailing list