# [cScm Daemon](https://csvn.radix.pro/cscm/trunk/doc/cscmd.8.md) **cscmd** – a daemon for monitoring changes in SCM configuration files. ## Table of Contents * [Options](#options) * [Grammar](#grammar) * [See Also](#see-also)
In order to not load the **cSvn-ui** and **cGit-ui** CGI scripts with unnecessary functionality and speed up its work, information about the list of repositories is transmitted to it in binary form through shared memory (see: */dev/shm/csvn.bcf*, */dev/shm/cgit.bcf*). Binary Config File (**BCF**) format is similar to the simplified implementation of the **COFF** and is described in the header file [*/usr/include/cscm/bcf.h*](https://csvn.radix.pro/cscm/trunk/cscm/bcf.h). On startup, the daemon parses the */etc/csvn-ui.rc* or */etc/csvn-ui.rc* configuration files (depends on **--scm=[svn|git]** option) and stores its binary forms in shared memory. In addition, the binary form is saved in the daemon's home directory, by default it is the file */var/lib/csvn/csvn.bcf* or */var/lib/cgit/cgit.bcf*. **cscmd(8)** daemon rereads SCM configuration files upon arrival of the **-HUP** signal and, in addition, can be configured to monitor changes in the configuration files using the `--inotify` option. If the `--inotify` option is specified, then after editing the file */ets/csvn-ui.rc* or */ets/cgit-ui.rc* and saving it to disk, the **cscmd** daemon will reread file */etc/csvn-ui.rc* or */etc/cgit-ui.rc* as if it received the **-HUP** signal. The work of the **cscmd(8)** daemon's can be monitored by the log, which it leaves in the file */var/log/csvnd.log* or the file */var/log/cgitd.log* (depends on **--scm=[svn|git]** option). There you can also observe messages about errors that are detected in */ets/csvn-ui.rc* or */ets/cgit-ui.rc* files, if any. To start the **cScm** daemon during system boot, can be used the start/stop script */etc/rc.d/rc.csvnd* or */etc/rc.d/rc.cgitd*. ## Options ### -h, --help Display help information. ### -v, --version Display the version of **cScm** daemon. ### -d, --daemonize Run in background as a daemon. ### -i, --inotify Notify about configuration changes. If this option is set then **cscmd(8)** daemon selects changes made in */etc/csvn-ui.rc* or */etc/cgit-ui.rc* configuration file and reread configuration when changes is done. Without this option rereading configuration file can be done by sending **-HUP** to the **cscmd(8)** process. ### -b, --bcf= Binary config file (depends on **--scm=[svn|git]** option). Default: */var/lib/csvn/csvn.bcf*. ### -c, --config= Config file (depends on **--scm=[svn|git]** option). Default: */etc/csvn-ui.rc*. ### -l, --log= Log file (depends on **--scm=[svn|git]** option). Default: */var/log/csvnd.log*. ### -p, --pid= Log file (depends on **--scm=[svn|git]** option). Default: */var/run/csvnd.pid*. ### -s, --scm=[svn|git] SCM engine name: **svn** or **git**. Default: **svn**. ### -t, --test Test the config file and exit. ## Grammar The grammar of the language describing the **cScm** congfiguration is simple ([**parse.y**](https://csvn.radix.pro/cscm/trunk/cscmd/parse.y)). File */etc/csvn-ui.rc* allows you to set variable values and create repository lists as named structures. Any variables can be defined in the */etc/csvn-ui.rc* file, but only variables with reserved names will be used by the **cSvn** or **cGit** CGI script. In addition, if a variable already defined at the global level is specified in the description of a repository, then within this repository this variable will have a local value. In other words, within the repository, global variables can be overridden. ## See Also > [**README**](https://csvn.radix.pro/cscm/trunk/README.md)