Confirmed users
927
edits
Tarek.ziade (talk | contribs) (Created page with "= Global Configuration File = All services on a Sync server share a common configuration. Here's a format proposal for a unique configuration file that can be used to group this...") |
Tarek.ziade (talk | contribs) No edit summary |
||
| Line 1: | Line 1: | ||
All services on a Sync server share a common configuration. Here's a format proposal for a unique configuration file that can be used to group this configuration. | All services on a Sync server share a common configuration. Here's a format proposal for a unique configuration file that can be used to group this configuration. | ||
= Syntax = | |||
The configuration file is a ini-based file. (See http://en.wikipedia.org/wiki/INI_file for more details.) Variables name can be assigned values, and grouped into sections. A line that starts with "#" is commented out. | The configuration file is a ini-based file. (See http://en.wikipedia.org/wiki/INI_file for more details.) Variables name can be assigned values, and grouped into sections. A line that starts with "#" is commented out. | ||
| Line 20: | Line 18: | ||
Ini readers in Python, PHP and other languages understand this syntax. Although, there are subtle differences in the way they interpret values an in particular if they convert them. | Ini readers in Python, PHP and other languages understand this syntax. Although, there are subtle differences in the way they interpret values an in particular if they convert them. | ||
== Values conversion == | |||
- If value is quoted with " chars, it's a string. This notation is useful to include "=" characters in the value. In case the value contains a " character, it must be escaped with a "\" character. | - If value is quoted with " chars, it's a string. This notation is useful to include "=" characters in the value. In case the value contains a " character, it must be escaped with a "\" character. | ||
| Line 43: | Line 41: | ||
three | three | ||
== Extending a file == | |||
An INI file can extend another file. For this, A "DEFAULT" section must contain an "extends" variable that can point to another INI file, which will be merged to the current file, by adding new sections and values. If the file pointed in "extends" contains section/variable names that already exist in the original file, they will not override existing ones. | An INI file can extend another file. For this, A "DEFAULT" section must contain an "extends" variable that can point to another INI file, which will be merged to the current file, by adding new sections and values. If the file pointed in "extends" contains section/variable names that already exist in the original file, they will not override existing ones. | ||
| Line 73: | Line 71: | ||
bas = bar | bas = bar | ||
= Sync INI files syntax = | |||
TBD | TBD | ||