66
www.obarun.org
66-env
Lists or replaces an environment variable of a service depending on the options passed.
Interface
66-env [ -h ] [ -v verbosity ] [ -t tree ] [ -d dir ] [ -L ] [ -r key=value ] service
-
This program opens and reads the configuration file of service found by default at /etc/66/conf.
-
It displays the contents of the file or replaces a key=value pair if instructed to do so with the ‑r option.
Exit codes
-
0 : success
-
110 : bad usage
-
111 : system call failed
Options
-
-h : print this help.
-
-v verbosity : increase/decrease verbosity of the command. 1(Default): Only print error messages. 2: Also print warning messages. 3: Also print debugging messages.
-
-t tree : ignored. Provides internal compatibility for 66 tools.
-
-d dir : use dir as configuration file directory instead of the default one.
-
-L : list defined environment variables for service.
-
-r key=value : override an existing key=value pair with the given one. The key=value needs to be double-quoted or single quoted in case of multiple arguments. In case of double quote 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
Unexport a key from the environment can be handled by using an exclamation mark "!" at the begin of the value. For example, :
66-env -r CMD_ARGS='!-c /etc/nginx/nginx.conf -g "daemon off;"'