Skip to content
Snippets Groups Projects
Commit 025ec8e9 authored by Eric Vidal's avatar Eric Vidal :speech_balloon:
Browse files

doc update

parent 9eb32d6d
No related branches found
No related tags found
No related merge requests found
......@@ -37,7 +37,7 @@ Handles an environment file and variable of a service depending on the options p
- **-t** : handles the *selection* of the given *tree*. This option is mandatory except if a tree was marked as 'current'—see [66-tree](66-tree.html).
- **-c** *version* : makes *version* as the current one to use by default. If the service is already running, you need to restart the *service* to apply the change by the command e.g. `66-start -r <service>`.
- **-c** *version* : makes *version* as the current one to use by default. If the service is already running, you need to restart the *service* to apply the change by the command e.g. `66-start -r <service>`.
- **-s** *version* : specifies the version to handles with the options **-V**, **-L**, **-r** and **-e** instead of using the current one.
......@@ -53,29 +53,29 @@ Handles an environment file and variable of a service depending on the options p
- **-i** *src,dst* : imports configuration file from *src* version to *dst* version. The *src* version and *dst* version need to be separated by a comma without space before and after it. It **do not import** the configuration written by the `66-enable` process but only deal with extra configuration files written by the sysadmin.
- **-e** : edit the configuration file with `EDITOR` set in your system environment. This is the default option if neither option is passed. If you use this option with a `sudo` command, you need to specify the `-E` option at sudo call—see [examples](66-env.html#Usage examples).
- **-e** : edit the configuration file with `EDITOR` set in your system environment. This is the default option if neither option is passed. If you use this option with a `sudo` command, you need to specify the `-E` option at sudo call—see [examples](66-env.html#Usage examples). Note: the upstream file (meaning the one prefixed with a dot) is **never** touched. A copy of the upstream file is copied (if it doesn't exist yet) and the *66-env* tool modifies that file.(see [Service configuration file](service-configuration-file) for further information).
## Usage examples
```
66-env -L ntpd
66-env -r CMD_ARGS=-d
66-env -r CMD_ARGS=-d
66-env -r CMD_ARGS='-c /etc/nginx/nginx.conf -g "daemon off;"'
66-env -i 0.1.6,0.1.7 nginx
66-env -V ntpd
sudo -E 66-env -e ntpd
66-env -s 0.1.6 ntpd
```
## Notes
Removing a *key* from the environment after the use can be handled by using an exclamation mark `!` at the begin of the value:
Removing a *key* from the environment after the use can be handled by using an exclamation mark `!` at the begin of the value:
```
66-env -r 'CMD_ARGS=!-c /etc/nginx/nginx.conf -g "daemon off;"'
......
......@@ -12,7 +12,7 @@ This command handles a directory containing a set of *services*.
## Interface
```
66-tree [ -h ] [ -z ] [ -v verbosity ] [ -l ] [ -n|R ] [ -a|d ] [ -c ] [ -S after_tree ] [ -E|D ] [ -U ] [ -C clone ] tree
66-tree [ -h ] [ -z ] [ -v verbosity ] [ -l ] [ -n|R ] [ -a|d ] [ -c ] [ -S after_tree ] [ -E|D ] [ -C clone ] tree
```
*66-tree* will create, destroy, or modify a tree which dynamically handles *services*. *66-tree* will handle the tree only for the user running the process (root/user). Any *tree* is completely independent from another. If you want to know what trees are currently available on the system use the [66-intree](66-intree.html) tool.
......@@ -53,8 +53,6 @@ This command handles a directory containing a set of *services*.
- **-R** : deletes *tree*. ***Can not be undone!*** This will completely remove the given *tree* from the system! You will not be able to retrieve any information of the deleted *tree* after deleting it. Services currently running on tree will be not bringed down before remove it. To do so, use the **-U** option in conjonction e.g. `66-tree -UR tree`.
- **-U** : deprecated option. Use [66-all unsupervise](66-all.html) instead.
- **-C** *clone* : makes a strict copy of *tree* named clone. Clone **must not** exist on the system.
## Why trees?
......
#!/bin/sh
html='66-all 66-dbctl 66-disable 66-echo 66-enable 66-env 66-init 66-inresolve 66-inservice 66-instate 66-intree 66-parser 66-scanctl 66-scandir 66-start 66-stop 66-svctl 66-tree 66-update 66-boot 66-hpr 66-shutdown 66-shutdownd 66-umountall 66-update 66-nuke frontend instantiated-service module-service index execl-envfile upgrade'
html='66-all 66-dbctl 66-disable 66-echo 66-enable 66-env 66-init 66-inresolve 66-inservice 66-instate 66-intree 66-parser 66-scanctl 66-scandir 66-start 66-stop 66-svctl 66-tree 66-update 66-boot 66-hpr 66-shutdown 66-shutdownd 66-umountall 66-update 66-nuke frontend instantiated-service module-service index execl-envfile service-configuration-file upgrade'
version=${1}
......
......@@ -4,7 +4,7 @@ man1='66-all 66-dbctl 66-disable 66-echo 66-enable 66-env 66-init 66-inresolve 6
man8='66-boot 66-hpr 66-shutdown 66-shutdownd 66-umountall'
man5='frontend instantiated-service module-service'
man5='frontend instantiated-service module-service service-configuration-file'
for i in 1 5 8;do
if [ ! -d doc/man/man${i} ]; then
......
title: The 66 Suite: service configuration file
author: Eric Vidal <eric@obarun.org>
[66](index.html)
[obarun.org](https://web.obarun.org)
# Service configuration file
If the `env` options at the `@options` field is set to a [frontend](frontend.html) service file, the `[environment]` section is copied to the `%%service_admconf%%/<service_name>/<service_version>/.service_name` file.
**Note**: The file name is prefixed with a dot.
This file is ***always*** written at [66-enable](66-enable.html) call. That means that every single changes made on this file will be lost. This is ensure you to you always have the environment variables set by upstream matching the needs of the service to be started properly.
However, to suit your needs you may want to change a value of a `key=value` pair or and a new one for a modified service. In that case, you need to make a copy of the upstream file to a new file at `%%service_admconf%%/<service_name>/<service_version>/` directories.
To accomplish this task, you have two solutions:
- use the [66-env](66-env.html) tool. This is the better and easy way to do it. This tool will take for you about the creation of the new file(if it doesn't exist yet) and allows you to edit it directly.
- copy manually the `%%service_admconf%%/<service_name>/<service_version>/.service_name` to `%%service_admconf%%/<service_name>/<service_version>/service_name`. The copied file can be named as you want.
At the service start process, the [execl-envfile](execl-envfile.html) tool will parses and reads every single file found at the `%%service_admconf%%/<service_name>/<service_version>/` directory in alphabetical order. That means that the upstream file will be read first than your modified file will be read. So, for a same `key=value` pair found at the upstream and modified file, the `key=value` pair coming from the modified file will be used.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment