[systemd-devel] Best way of configuring service
lennart at poettering.net
Mon Sep 24 13:36:34 PDT 2012
On Mon, 24.09.12 21:58, Daniel Tihelka (dtihelka at gmail.com) wrote:
> But still, there are java-specific options which must be set (and may
> be required to be customized) as well - for example the -Xmx or -Xms
> settings. And I am most likely not able to change it in java :-)
If it is likely that you can find good defaults then I'd simply pass
them on the command line as is. Admins can then simply copy your
.service file from /usr to /etc and edit the command line there.
> Anyway, one more ask - I have filled feature request at
> Do you think that it is doable or completely useless? Where to look in
> systemd code to implement this?
Hmm, so this is harder actually than it might sounds, since we must
avoid NSS lookups from PID1. But I guess we could do this as part of the
minimal env var replacement we do for the command line too, in
execute.c (which rns in the forked off process, before we invoke the
service binary). That way you could write something like
"WorkingDirectory=$HOME" or so. I added this to the todo list now.
Lennart Poettering - Red Hat, Inc.
More information about the systemd-devel