Chapter 5. Configuration file generator (lms-mgc)

Table of Contents
5.1. Installation
5.2. Configuration
5.2.1. Section [database] - database setup
5.2.2. Section [mgc] - list of instances
5.2.3. Section [mgc:xxx] - instance configuration
5.2.4. Configuration variables
5.3. Examples of use

LMS-MGC is "magical" configuration file generator. With some efforts, you can create virtually any configuration file using it (ie. zone definition file for BIND)

5.1. Installation

LMS-MGC has its own configuration file: lms-mgc.ini. You should install script by moving it to /usr/sbin directory. LMS-MGC should be used in two either ways: scheduled from cron (eg. hourly)

0 * * * *       /usr/sbin/lms-mgc 1 > /dev/null

or called from LMS 'Reload' menu. Second setup requires sudo to be used. Unfortunately this method requires you to add user to sudo, and set in configuration section [phpui]

reload_type = exec

reload_execcmd = sudo /usr/sbin/lms-mgc

LMS-MGC has following command line options:

-C, --config-file=/path/lms-mgc.ini alternative configuration file
                                    (default: /etc/lms/lms-mgc.ini);
-i, --instances=name                instance name (number) to launch, without reading
                                    lms-mgc.ini configuration, ie. -i "name1 name2"
-h, --help                          shows help;
-v, --version                       shows version number;
-q, --quiet                         shows only errors during execution;
-d, --debug                         verbose information for each IP;