]> Cypherpunks.ru repositories - nncp.git/blob - doc/cfg/dir.texi
82979258746bc278c5bd413e3234e49f856c2e9d
[nncp.git] / doc / cfg / dir.texi
1 @node Configuration directory
2 @section Configuration directory
3
4 Optionally you can convert configuration file to the directory layout
5 with @ref{nncp-cfgdir} command. And vice versa too, of course loosing
6 the comment lines. Directory layout can looks like that:
7
8 @example
9 nncp-cfg-dir
10 ├── areas
11 │   ├── home
12 │   │   ├── id
13 │   │   ├── incoming
14 │   │   ├── prv
15 │   │   ├── pub
16 │   │   └── subs
17 │   └── homero
18 │       ├── id
19 │       ├── exec
20 │       │   └── sendmail
21 │       ├── prv
22 │       ├── pub
23 │       └── allow-unknown
24 ├── log
25 ├── mcd-listen
26 ├── neigh
27 │   ├── beta
28 │   │   ├── exchpub
29 │   │   ├── exec
30 │   │   │   └── sendmail
31 │   │   ├── id
32 │   │   ├── incoming
33 │   │   ├── noisepub
34 │   │   ├── signpub
35 │   │   └── via
36 │   ├── gw
37 │   │   ├── addrs
38 │   │   │   ├── lan
39 │   │   │   └── main
40 │   │   ├── calls
41 │   │   │   ├── 0
42 │   │   │   │   ├── autotoss
43 │   │   │   │   ├── cron
44 │   │   │   │   ├── nice
45 │   │   │   │   └── rxrate
46 │   │   │   ├── 1
47 │   │   │   │   ├── addr
48 │   │   │   │   ├── autotoss
49 │   │   │   │   ├── cron
50 │   │   │   │   └── onlinedeadline
51 │   │   │   └── 2
52 │   │   │       ├── addr
53 │   │   │       ├── autotoss
54 │   │   │       ├── cron
55 │   │   │       └── onlinedeadline
56 │   │   ├── exchpub
57 │   │   ├── exec
58 │   │   │   └── sendmail
59 │   │   ├── freq
60 │   │   │   └── chunked
61 │   │   ├── id
62 │   │   ├── incoming
63 │   │   ├── noisepub
64 │   │   └── signpub
65 │   └── self
66 │       ├── exchpub
67 │       ├── exec
68 │       │   ├── appender
69 │       │   ├── sendmail
70 │       │   └── slow
71 │       ├── freq
72 │       │   └── path
73 │       ├── id
74 │       ├── incoming
75 │       ├── noisepub
76 │       └── signpub
77 ├── notify
78 │   ├── file
79 │   │   ├── from
80 │   │   └── to
81 │   └── freq
82 │       ├── from
83 │       └── to
84 ├── self
85 │   ├── exchprv
86 │   ├── exchpub
87 │   ├── id
88 │   ├── noiseprv
89 │   ├── noisepub
90 │   ├── signprv
91 │   └── signpub
92 └── spool
93 @end example
94
95 Your @option{-cfg} and @env{$NNCPCFG} could point to that directory,
96 instead of @file{.hjson} file. It will be transparently converted to
97 internal JSON representation. However it can not be encrypted with the
98 @ref{nncp-cfgenc}.
99
100 That layout should be much more machine friendly and scriptable. Each
101 string parameters is stored as a single line plain text file. String
102 arrays are newline-separated plain text files. Dictionaries are
103 transformed to the subdirectories. Its structure should be
104 self-describing. True booleans are stored as an empty flag-file
105 existence (their absence equals to false). All names starting with "."
106 are skipped. All files ending with @file{prv} are created with 600
107 permissions, instead of the default 666.