LMS - LAN Management System 1.11-git
Prev | Chapter 7. For curious | Next

# 7.3. Configuration file format

Configuration file default location is `/etc/lms/lms.ini`. It's intended to be central configuration for LMS-UI, LMS-MGC and other scripts (exluding lmsd daemon). However variable format for Perl scripts is more restricted than for PHP.

## 7.3.1. Comments

Configuration file parsers skip all lines that begin with '#' or ';' sign. You can also append comments to the end of the lines containing valid variables and sections , followed by that signs.

## 7.3.2. Sections, variables, values

Configuration options are grouped in sections. Name of the section, which is build with alphanumerical signs must be enclosed in square brackets. Their name should be unique in the span of configuration file.

Sections and parameters should be placed one per line. Parameter consists of key (variable name) and value (variable content). Key is name of configuration parameter, built from alphanumerical signs. Value should be placed in the same line, after equality sign. If it contains any special characters it should be placed into quotes or apostrophes.

Example 7-1. Format of configuration options

    [section]
    key =  value
    variable1 = "some text"
    para_meter = 'i am "para_meter" variable in apostrophes'

    [section_1]                    # you can comment here
    key = "text with specials: \t and ;"     ; you can comment here either
    ; and this is comment all line long
    key = "A.L.E.C's LMS Daemon is the best"
    # option = disabled

## 7.3.3. Perl scripts variables

Configuration for use by Perl scripts is someway restricted, due to restrictions of Config::IniFiles module which parses configuration file. Comments must be placed in new lines only. Values shouldn't be enclosed into apostrophes or quotes and are being read from equality sign since the end of line.

Prev | Home | Next
Database structure | Up | Filling DB with random data