cScm Configuration Daemon

cScm – is a tool to convert SCM configuration files into binary format and store its in shared memory for reading by cSvn-ui and cGit-ui CGI scripts

2 Commits   0 Branches   1 Tag
author: kx <kx@radix.pro> 2023-03-24 02:53:04 +0300 committer: kx <kx@radix.pro> 2023-03-24 02:53:04 +0300 commit: 12c7b1c5658602269da2f5b75835ec0f5fab8890 parent: 4e72ffe940d9aff7c019d37a6459e765902c1fae
Commit Summary:
Version 0.1.4
Diffstat:
1 file changed, 60 insertions, 0 deletions
diff --git a/doc/cscmd.8.md b/doc/cscmd.8.md
new file mode 100644
index 0000000..b0c9423
--- /dev/null
+++ b/doc/cscmd.8.md
@@ -0,0 +1,112 @@
+
+# [cScm Daemon](https://csvn.radix.pro/cscm/trunk/doc/cscmd.8.md)
+
+**cscmd** &#8211; a daemon for monitoring changes in SCM configuration files.
+
+
+## Table of Contents
+
+* [Options](#options)
+* [Grammar](#grammar)
+* [See Also](#see-also)
+
+<br/>
+
+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=<BCF_FILE>
+
+Binary config file (depends on **--scm=[svn|git]** option). Default: */var/lib/csvn/csvn.bcf*.
+
+
+### -c, --config=<CONFIG_FILE>
+
+Config file (depends on **--scm=[svn|git]** option). Default: */etc/csvn-ui.rc*.
+
+
+### -l, --log=<LOG_FILE>
+
+Log file (depends on **--scm=[svn|git]** option). Default: */var/log/csvnd.log*.
+
+
+### -p, --pid=<PID_FILE>
+
+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)
+