diff options
Diffstat (limited to 'frags/configuration-format.rst')
-rw-r--r-- | frags/configuration-format.rst | 70 |
1 files changed, 35 insertions, 35 deletions
diff --git a/frags/configuration-format.rst b/frags/configuration-format.rst index 6f7ad869..5a74c775 100644 --- a/frags/configuration-format.rst +++ b/frags/configuration-format.rst @@ -1,16 +1,22 @@ Configuration format -------------------- -In Taler realm, any component obeys to the same pattern to get -configuration values. According to this pattern, once the component has -been installed, the installation deploys default values in -${prefix}/share/taler/config.d/, in .conf files. In order to override -these defaults, the user can write a custom .conf file and either pass -it to the component at execution time, or name it taler.conf and place -it under $HOME/.config/. +All GNU Taler components are designed to possibly share the same +configuration files. When installing a GNU Taler component, the +installation deploys default values in configuration files located +at ${prefix}/share/taler/config.d/ where ${prefix} is the installation +prefix. Different components must be installed to the same prefix. + +In order to override these defaults, the user can write a custom configuration +file and either pass it to the component at execution time using the *-c* +option, or name it taler.conf and place it under $HOME/.config/ which is where +components will look by default. Note that the systemd service files pass ``-c +/etc/taler/taler.conf``, thus making ``/etc/taler/taler.conf`` +the primary location for the configuration. A config file is a text file containing sections, and each section -contains its values. The right format follows: +contains maps options to their values. Configuration files follow +basically the INI syntax: .. code-block:: ini @@ -22,43 +28,37 @@ contains its values. The right format follows: value21 = string value22 = /path22 -Throughout any configuration file, it is possible to use ``$``-prefixed -variables, like ``$VAR``, especially when they represent filesystem -paths. It is also possible to provide defaults values for those +Comments start with a hash (``#``). Throughout the configuration, it is +possible to use ``$``-substitution for options relating to names of files or +directories. It is also possible to provide defaults values for those variables that are unset, by using the following syntax: -``${VAR:-default}``. However, there are two ways a user can set -``$``-prefixable variables: +``${VAR:-default}``. There are two ways a user can set the value +of ``$``-prefixable variables: -by defining them under a ``[paths]`` section, see example below, +(1) by defining them under a ``[paths]`` section: -.. code-block:: ini + .. code-block:: ini - [paths] - TALER_DEPLOYMENT_SHARED = ${HOME}/shared-data - .. - [section-x] - path-x = ${TALER_DEPLOYMENT_SHARED}/x + [paths] + TALER_DEPLOYMENT_SHARED = ${HOME}/shared-data + .. + [section-x] + path-x = ${TALER_DEPLOYMENT_SHARED}/x -or by setting them in the environment: +(2) or by setting them in the environment: -.. code-block:: console + .. code-block:: console - $ export VAR=/x + $ export VAR=/x The configuration loader will give precedence to variables set under -``[path]``, though. +``[path]`` over environment variables. -The utility ``taler-config``, which gets installed along with the -exchange, serves to get and set configuration values without directly -editing the .conf. The option ``-f`` is particularly useful to resolve +The utility ``taler-config``, which gets installed along with the exchange, +can be used get and set configuration values without directly editing the +configuration file. The option ``-f`` is particularly useful to resolve pathnames, when they use several levels of ``$``-expanded variables. See ``taler-config --help``. -Note that, in this stage of development, the file -``$HOME/.config/taler.conf`` can contain sections for *all* the -component. For example, both an exchange and a bank can read values from -it. - -The repository ``git://git.taler.net/deployment`` contains examples of -configuration file used in our demos. See under ``deployment/config``. - +The repository ``git://git.taler.net/deployment`` contains example code +for generating configuration files under ``deployment/netzbon/``. |