I noticed it doesn't work.
And well since I am building an RPM the only option I can think of is either use a custom startup script which will set the limits manually or define the service as a config file in the RPM.

Maybe you have some experience with overwriting the service files with RPMS, maybe there is some kind of practice use for this?

The main issue is that if I hardcode it in the service file the RPM will replace it each and every time. If I will use it as a config file it will stay the same and it might be the better solution.
Seeking after thought and ideas on the best way to implement it.

Eliezer

On 03/09/2015 18:35, Lennart Poettering wrote:
On Thu, 03.09.15 17:45, Eliezer Croitoru ([email protected]) wrote:

Hey,

I am working on a service for squid caching service.
I have a need to define LimitNOFILE from an environmental variable instead
of only the service file.

No this does not work. Environment expansion is only done for
ExecStart= and related lines, and the environment is only determined
right when the binary is invoked.

Generally: configuration for units is supposed to be placed in units,
Splitting that into environment files such as /etc/sysconfig/* makes
things both more opaque for the admin and harder to process from
applications reading unit files. Hence, your usecase is explicitly
something we don't recommend.

Lennart


_______________________________________________
systemd-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to