>Concerning the system tree loggers, my first idea is to set an environment variable somewhere in the scripts s6-linux-init provides.
>
>Is this even possible?
>
>What would be the best place to do this?
Any environment variable you want to make available for a whole
supervision tree should be added via a "-e var=value" option to your
s6-linux-init-maker invocation.
For user supervision trees, I suppose you're not using s6-l-i-m, so
the best place would be to put the variables in an envdir and use
"-E $envdir" (and possibly "-e $var" if you need to substitute $USER
or something) in your s6-usertree-maker invocation.
If you're not using these tools, the best way is to do the same thing
they do: put the variables in an envdir somewhere, and source the envdir
both before running s6-svscan and before running your s6-rc-init and
s6-rc script.
--
Laurent
Received on Sat Jul 06 2024 - 12:06:02 CEST