mirror of
https://github.com/troglobit/finit.git
synced 2026-11-29 21:08:21 +00:00
doc: document support for global environment variables
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
1 parent
d70d86e9fe
commit
f46ac20fb0
2 files changed
+31
No files matched your search
@@ -44,6 +44,7 @@ you *need* to upgrade!
|
|||||||
* Log to `stderr` when running in a container w/o syslog daemon
|
* Log to `stderr` when running in a container w/o syslog daemon
|
||||||
* Add support for `type:forking` to services, already supported but
|
* Add support for `type:forking` to services, already supported but
|
||||||
with a very difficult `pid:` syntax. Documentation updated
|
with a very difficult `pid:` syntax. Documentation updated
|
||||||
|
* Support for setting global environment variables in `finit.conf`
|
||||||
|
|
||||||
### Fixes
|
### Fixes
|
||||||
* Fix nasty 32/64-bit alignment issue between finit and its plugins,
|
* Fix nasty 32/64-bit alignment issue between finit and its plugins,
|
||||||
|
|||||||
@@ -73,6 +73,36 @@ document [Finit Services](service.md).
|
|||||||
> examples in the `contrib/` directory, which can be used as a base.
|
> examples in the `contrib/` directory, which can be used as a base.
|
||||||
|
|
||||||
|
|
||||||
|
### Environment Variables
|
||||||
|
|
||||||
|
In Finit v4.3 support for setting environment variables in `finit.conf`,
|
||||||
|
and any `*.conf`, was added. It is worth noting that these are global
|
||||||
|
and *shared with all* services -- the only way to have service-local
|
||||||
|
environment is detailed in the next section.
|
||||||
|
|
||||||
|
The syntax for global environment variables is straight forward:
|
||||||
|
|
||||||
|
foo=bar
|
||||||
|
baz="qux"
|
||||||
|
|
||||||
|
On reload of .conf files, all tracked environment variables are cleared
|
||||||
|
so if `foo=bar` is removed from `finit.conf`, or any `finit.d/*.conf`
|
||||||
|
file, it will no longer be used by Finit or any new (!) started
|
||||||
|
run/tasks or services. The environment of already started processes can
|
||||||
|
not be changed.
|
||||||
|
|
||||||
|
The only variables reset to sane defaults on .conf reload are:
|
||||||
|
|
||||||
|
PATH=_PATH_STDPATH
|
||||||
|
SHELL=_PATH_BSHELL
|
||||||
|
LOGNAME=root
|
||||||
|
USER=root
|
||||||
|
|
||||||
|
It is entirely possible to override these as well from the .conf files,
|
||||||
|
but be careful. Changing SHELL changes the behavior of `system()` and a
|
||||||
|
lot of other commands as well.
|
||||||
|
|
||||||
|
|
||||||
Service Environment
|
Service Environment
|
||||||
-------------------
|
-------------------
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user