[systemd-devel] Where to put the environment files?

Lennart Poettering lennart at poettering.net
Mon Sep 26 09:34:56 PDT 2011


On Sat, 24.09.11 13:36, Kay Sievers (kay.sievers at vrfy.org) wrote:

> 
> On Sat, Sep 24, 2011 at 10:57, Thomas Meyer <thomas at m3y3r.de> wrote:
> > is there a recommendation where to best put the environment files? and
> > what file extension should these files have?
> >
> > I did prepare this service unit for apache derby and did put the
> > environment file into /usr/share/java/derby/
> >
> > [Unit]
> > Description=Apache Derby Database Network Server
> > After=network.target
> >
> > [Service]
> > Type=simple
> > EnvironmentFile=/usr/share/java/derby/derbyNetworkServer.env
> > WorkingDirectory=/var/lib/derby
> > StandardOutput=syslog
> > User=derby
> > ExecStart=/usr/bin/java org.apache.derby.drda.NetworkServerControl start
> >
> > [Install]
> > WantedBy=multi-user.target
> 
> Ideally this server would read its own config file from
> /usr/lib/java/foo.conf and /etc/java/foo.conf, with the usual
> admin-overwrite logic. If the file in etc exists the file in lib is
> ignored. That way packages ship the default settings, but admins can
> overwrite them in etc.

Also see:

http://0pointer.de/blog/projects/on-etc-sysinit.html

Lennart

-- 
Lennart Poettering - Red Hat, Inc.


More information about the systemd-devel mailing list