Both sides previous revisionPrevious revisionNext revision | Previous revision |
config:ini_files [2012/06/15 03:05] – [Configuration] removed filesync.ini (gone) digitalman | config:ini_files [2023/10/26 17:21] (current) – Add text.ini digital man |
---|
====== INI Files ====== | ====== .ini files ====== |
| |
| ''.ini'' files are used by Synchronet for //initialization// control, //configuration//, and //data-storage//. |
| |
===== Configuration ===== | ===== Configuration ===== |
| |
Synchronet supports a variety of configuration files of different formats. A growing majority of these configuration files are of the [[wp>INI file]] type. Synchronet's INI configuration files are typically stored in the ''[[dir:ctrl]]'' directory, with a ''.ini'' filename suffix/extension. | Synchronet's INI configuration files are typically stored in the ''[[dir:ctrl]]'' directory, with a ''.ini'' filename suffix/extension. |
| |
| ==== Primary Configuration Files ==== |
| |
| The primary configuration files managed by the [[util:SCFG]] utility are: |
| ^ Filename ^ Description ^ |
| |''[[sbbs.ini]]'' |[[https://gitlab.synchro.net/sbbs/sbbs/-/raw/master/ctrl/sbbs.ini|Synchronet Server Initialization File]] | |
| | ''main.ini'' | Primary system settings (e.g. BBS name, location, security settings) and command shells | |
| | ''msgs.ini'' | Message areas, message options, and message networking | |
| | ''file.ini'' | File areas (for uploads, download), text file areas, and file-related options | |
| | ''xtrn.ini'' | External program configurations which includes timed events, message editors, hot-key events and doors | |
| | ''chat.ini'' | Chat Features settings, specifically the Guru, Multi-node chat actions and channels, and external sysop pagers | |
| | ''node.ini'' | Located in the [[dir:node|node directories]], and configured via the SCFG [[util:scfg:Nodes]] menu | |
| |
| ==== Secondary Configuration Files ==== |
| |
^Filename Page ^Default Contents^ | ^Filename Page ^Default Contents^Description^ |
|''[[cgi_env.ini]]'' |[[http://cvs.synchro.net/cgi-bin/viewcvs.cgi/*checkout*/ctrl/cgi_env.ini|cgi_env.ini]]| | |''[[custom:text.ini]]'' |N/A | Customized ''text.dat'' strings (optional) | |
|''[[formmail.ini]]'' |[[http://cvs.synchro.net/cgi-bin/viewcvs.cgi/*checkout*/ctrl/formmail.ini|formmail.ini]]| | |''text.//lang//.ini'' |varies | Alternate language ''text.ini'' files | |
|''[[ircbot.ini]]'' |[[http://cvs.synchro.net/cgi-bin/viewcvs.cgi/*checkout*/ctrl/ircbot.ini|ircbot.ini]]| | |''[[cgi_env.ini]]'' |[[https://gitlab.synchro.net/sbbs/sbbs/-/raw/master/ctrl/cgi_env.ini|cgi_env.ini]]|[[server:Web]] Server CGI Settings| |
|''[[listserver.ini]]'' |[[http://cvs.synchro.net/cgi-bin/viewcvs.cgi/*checkout*/ctrl/listservier.ini|listserver.ini]]| | |''[[formmail.ini]]'' |[[https://gitlab.synchro.net/sbbs/sbbs/-/raw/master/ctrl/formmail.ini|formmail.ini]]|Configuration for ''[[dir:web]]/formmail.ssjs'', Synchronet's Server-side [[custom:JavaScript]] version of [[http://www.scriptarchive.com/formmail.html|FormMail]]| |
|''[[mailproc.ini]]'' |[[http://cvs.synchro.net/cgi-bin/viewcvs.cgi/*checkout*/ctrl/mailproc.ini|maillproc.ini]]| | |''[[ircbot.ini]]'' |[[https://gitlab.synchro.net/sbbs/sbbs/-/raw/master/ctrl/ircbot.ini|ircbot.ini]]|Configuration for IRC robots, optionally works with the Synchronet [[service:IRCd]]| |
|''[[mime_types.ini]]'' |[[http://cvs.synchro.net/cgi-bin/viewcvs.cgi/*checkout*/ctrl/mime_types.ini|mime_types.ini]]| | |''[[listserver.ini]]'' |[[https://gitlab.synchro.net/sbbs/sbbs/-/raw/master/ctrl/listservier.ini|listserver.ini]]|Configuration for the Synchronet ListServer module (''[[dir:exec]]/[[module:listserver]].js'')| |
|''[[modopts.ini]]'' |[[http://cvs.synchro.net/cgi-bin/viewcvs.cgi/*checkout*/ctrl/modopts.ini|modopts.ini]]| | |''[[mailproc.ini]]'' |[[https://gitlab.synchro.net/sbbs/sbbs/-/raw/master/ctrl/mailproc.ini|mailproc.ini]]|Configuration of External Mail Processors for the [[server:Mail]] Server (SMTP)| |
|''[[rss.ini]]'' |[[http://cvs.synchro.net/cgi-bin/viewcvs.cgi/*checkout*/ctrl/rss.ini|rss.ini]]| | |''[[mime_types.ini]]'' |[[https://gitlab.synchro.net/sbbs/sbbs/-/raw/master/ctrl/mime_types.ini|mime_types.ini]]|MIME File Types registered in the [[server:Web]] Server| |
|''[[sbbs.ini]]'' |[[http://cvs.synchro.net/cgi-bin/viewcvs.cgi/*checkout*/ctrl/sbbs.ini|sbbs.ini]]| | |''[[modopts.ini]]'' |[[https://gitlab.synchro.net/sbbs/sbbs/-/raw/master/ctrl/modopts.ini|modopts.ini]]|Configuration settings (options) for various [[custom:JavaScript]] modules, stock and/or 3rd party| |
|''[[sbbsexec.ini]]'' |[[http://cvs.synchro.net/cgi-bin/viewcvs.cgi/*checkout*/exec/sbbsexec.ini|sbbsexec.ini]]| | |''[[rss.ini]]'' |[[https://gitlab.synchro.net/sbbs/sbbs/-/raw/master/ctrl/rss.ini|rss.ini]]|Configuration for Synchronet RSS Feed module (''[[dir:web]]/root/rss.ssjs'')| |
|''[[services.ini]]'' |[[http://cvs.synchro.net/cgi-bin/viewcvs.cgi/*checkout*/ctrl/services.ini|services.ini]]| | |''[[sbbsctrl.ini]]'' |N/A|Configuration for Synchronet Control Panel ([[monitor:SBBSCTRL]]) for Windows, exported from Windows Registry| |
|''[[sexpots.ini]]'' |N/A| | |''[[sbbsexec.ini]]'' |[[https://gitlab.synchro.net/sbbs/sbbs/-/raw/master/exec/sbbsexec.ini|sbbsexec.ini]]|Configuration for the Synchronet Virtual FOSSIL / UART Driver for Windows| |
|''[[sexyz.ini]]'' |N/A| | |''[[services.ini]]'' |[[https://gitlab.synchro.net/sbbs/sbbs/-/raw/master/ctrl/services.ini|services.ini]]|Configuration for Synchronet [[service:|Services]]| |
|''[[sockopts.ini]]'' |[[http://cvs.synchro.net/cgi-bin/viewcvs.cgi/*checkout*/ctrl/sockopts.ini|sockopts.ini]]| | |''[[sexpots.ini]]'' |N/A|Configuration for Synchronet External POTS Support utility ([[util:SEXPOTS]])| |
|''[[web_handler.ini]]'' |[[http://cvs.synchro.net/cgi-bin/viewcvs.cgi/*checkout*/ctrl/web_handler.ini|web_handler.ini]]| | |''[[sexyz.ini]]'' |N/A|Configuration for Synchronet External X/Y/ZMODEM protocol driver ([[util:SEXYZ]])| |
|''[[webicons.ini]]'' |[[http://cvs.synchro.net/cgi-bin/viewcvs.cgi/*checkout*/ctrl/webicons.ini|webicons.ini]]| | |''[[sockopts.ini]]'' |[[https://gitlab.synchro.net/sbbs/sbbs/-/raw/master/ctrl/sockopts.ini|sockopts.ini]]|Configuration of TCP/IP socket options| |
| |''[[web_handler.ini]]'' |[[https://gitlab.synchro.net/sbbs/sbbs/-/raw/master/ctrl/web_handler.ini|web_handler.ini]]|Configuration of special content (file type) handlers for the [[server:Web]] Server| |
| |''[[webicons.ini]]'' |[[https://gitlab.synchro.net/sbbs/sbbs/-/raw/master/ctrl/webicons.ini|webicons.ini]]|Configuration of icon files used to represent specific file types in the [[server:Web]] Server| |
| |
===== Database ===== | ===== Database ===== |
Synchronet uses the XPDEV library for it's INI file parsing and creation. The XPDEV INI file syntax closely matches that of the common use in Windows applications. The basic syntax is: | Synchronet uses the XPDEV library for it's INI file parsing and creation. The XPDEV INI file syntax closely matches that of the common use in Windows applications. The basic syntax is: |
| |
<file> | <code ini> |
; INI files are plain text files that may be edited with a common text editor. | ; INI files are plain text files that may be edited with a common text editor. |
| |
[section2] | [section2] |
SectionKey=42 | SectionKey=42 |
</file> | </code> |
| |
The Synchronet/XPDEV INI file format has some minor deviations from the Windows INI format: | The Synchronet/XPDEV INI file format has some minor deviations from the Windows INI format: |
| |
Example: | Example: |
<file> | <code ini> |
; This is the top of the file | ; This is the top of the file |
| |
;This is a section named "some section" (not the "root section") | ;This is a section named "some section" (not the "root section") |
SomeSectionKey=Value | SomeSectionKey=Value |
</file> | </code> |
==== Named Sections ==== | ==== Named Sections ==== |
| |
| |
Example: | Example: |
[Mail|Web] | <code ini> |
; The keys in this section belong to both the "Mail" and "Web" sections | [Mail|Web] |
| ; The keys in this section belong to both the "Mail" and "Web" sections |
| </code> |
Note: Since section names may not be reused in a single ''.ini'' file, a single section with more than one name will be the **only** representation of the named sections and any following section with one of the used names will be ignored. | Note: Since section names may not be reused in a single ''.ini'' file, a single section with more than one name will be the **only** representation of the named sections and any following section with one of the used names will be ignored. |
| |
| ==== String Literals ==== |
| |
| By using a colon character ('':'') rather than equals sign (''='') as a key/value separator, string value with embedded control characters and trailing white-space characters may be specified in ''.ini'' files. |
| |
| === Quotes === |
| If the first non-white-space character following the colon key/value separate is a double-quote (''"'') character, then the string will be terminated at the last (right-most) double-quote character. This allows a string value to be specified with trailing white-space: |
| mystring: "a string with trailing white-space " |
| |
| === Escape Sequences === |
| Character values may be specified using C-style character literal escaping for control characters (e.g. ''\r'' for carriage-return, ''\n'' for line-feed, ''\x01'' for Ctrl-A, etc.) or CP437 characters (e.g. ''\xb3'' for a vertical bar). |
==== Directives ==== | ==== Directives ==== |
| |
| |
Example: | Example: |
!include another.ini | <code ini> |
| !include another.ini |
| </code> |
| |
| In Synchronet v3.18c, the ability to include multiple files was added, e.g. |
| |
| <code ini> |
| !include sub-dir/*.ini |
| </code> |
| |
===== Editing ===== | ===== Editing ===== |
==== Enumerated Values ==== | ==== Enumerated Values ==== |
| |
Some keys support values specified either by number (typically from ''0'' through n) or by a symbolic name for each supported value. These are referred to a enumerated values. | Some keys support values specified either by number (typically from ''0'' through n) or by a symbolic name for each supported value. These are referred to as enumerated values. |
| |
A numeric value higher than the highest supported enumerated value will be treated the same as the highest supported enumerated value. | A numeric value higher than the highest supported enumerated value will be treated the same as the highest supported enumerated value. |
| |
| When a word is provided for the enumerated key value, an exact case-insensitive match is performed search following by a partial-match search, so "Debug" would match the enum value for "Debugging", and "Info" would match the enum value for "Informational". |
| |
=== Log Levels === | === Log Levels === |
* ''MUTE'' | * ''MUTE'' |
| |
These could be specified in a ''.ini'' file like so: | These could be specified in a ''.ini'' file like so: |
Options = NO_HOST_LOOKUP | NO_RECYCLE | GET_IDENT | <code ini> |
| Options = NO_HOST_LOOKUP | NO_RECYCLE | GET_IDENT |
| </code> |
| |
===== Source Code ===== | ===== Source Code ===== |
| |
Synchronet's INI file support comes from the XPDEV C library. The main source file is [[http://cvs.synchro.net/cgi-bin/viewcvs.cgi/src/xpdev/ini_file.c]]. | Synchronet's INI file support comes from the XPDEV C library. The main source file is [[https://gitlab.synchro.net/sbbs/sbbs/-/blob/master/src/xpdev/ini_file.c]]. |
| |
===== See Also ===== | ===== See Also ===== |
* [[config:cfg_files|CFG Files]] | * [[config:cfg_files|CFG Files]] |
* [[config:cnf_files|CNF Files]] | * [[config:cnf_files|CNF Files]] |
| |
| |
| |
| {{tag>configuration file_type ini}} |