summaryrefslogtreecommitdiff
path: root/doc/cscmd.8.md
blob: b0c942365002496ff36af181de9108562a44883d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
# [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)

<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)