66
www.obarun.org
66-env
66-env lists or replace an environment variables of a service depending of the options past.
Interface
66-env [ -h ] [ -v verbosity ] [ -t tree ] [ -d dir ] [ -L ] [ -r key=value ] service
-
66-env open and read the configuration file of service find at /etc/66/conf by default.
-
It display the contain of the file or replace a key=value pair if requested.
Exit codes
- 0: success.
- 110: wrong usage.
- 111: system call failed.
Options
-
-h : prints this help.
-
-v verbosity : increases/decreases
the verbosity of the command. 1(Default): Only print
error messages. 2: Also print warning messages.
3: Also print debugging messages.
-
-t tree : ignored. This option is only provide to keep compatibility between 66 tools.
-
-d dir : use dir as configuration file directory instead of the default one.
-
-L : lists the environment variable of service.
-
-r key=value : replace the key=value pair by the given one. The key=value need to be double-quoted in case of multiple arguments. Backslash '\' should be used to properly parse a double-quoted element.
Usage examples
66-env -L ntpd
66-env -r CMD_ARGS=-d
66-env -r "CMD_ARGS=-c /etc/nginx/nginx.conf -g \"daemon off;\""
Notes
Any '!' character found at begins of a key=value from the configuration service file is ignored at replacement time. For example, a key=value corresponding to:
!CMD_ARGS=--print-pid=4
can be replaced by the command:
66-env -r CMD_ARGS=--print-pid=3