On Wednesday 31 October 2012 16:46:55 Mantas Mikulėnas wrote:
> On Wed, Oct 31, 2012 at 3:28 PM, Honza Horak
<[email protected]> wrote:
> > My use case is the following: the service should be started with
some
> > environment variables defined, but the variable values are not
static, but
> > rather dynamically generated using some script. This could be
solved by
> > using EnvironmentFile=-/var/run/myservice, while this file would
be
> > generated in ExecStartPre=/usr/libexec/myservice-gen-env.
>
> This could also be solved by using the script directly as ExecStart,
> and having it `exec` the real service (possibly `exec "$@"`) as its
> last step. That way, you wouldn't need to actually generate a file
> (just `export` the variables before exec'ing) or rely on specific
> execution order.

if you have socket activation, systemd passed socket have   close-on-
exec flag set.  thus you can't exec real server in scripts.

--
 ______________
< gentoo rocks >
 --------------
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||

Attachment: signature.asc
Description: This is a digitally signed message part.

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

Reply via email to