Artur Hefczyc <artur.hefczyc@tigase.net> v2.0, June 2014: Reformatted for AsciiDoc. :toc: :numbered: :website: http://tigase.net :Date: 2010-04-06 21:16
Configuration tool allows to look at configuration settings and modify parameters. It takes care about proper parameters types and encoding.
First answer to the question: "Why to use configuration tool instead of directly, manually edit config file?"
There are a couple of reason why you should NOT manually edit configuration file and use the tool to modify settings:
Configuration management tool is a Java class - tigase.conf.Configurator. To make it easier to use this class there is also shell script available - config.sh.
First thing you can do is running the script with -h parameter:
./scripts/config.sh -h
In response you get description of all available parameters:
Parameters: -h this help message -c file configuration file -key key node/key for the value to set -value value value to set in configuration file -set set given value for given key -add add given value to the values list for given key -print print content of all configuration settings or of given node/key -f force creation of the new property - dangerous option... Samples: Setting admin account - overwriting any previous value(s) $ ./scripts/config.sh -c tigase-config.xml -print -set -key session_1/admins -value admin1@localhost Adding next admin account leaving old value(s) $ ./scripts/config.sh -c tigase-config.xml -print -add -key session_1/admins -value admin2@localhost Note: adding -print option is useful always, even with -set or -add option as it prints set value afterwards.
Let’s assume configuration for your server is located in tigase-config.xml file. So the first thing you need to set when calling the tool is location of the configuration file.