-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.config
111 lines (86 loc) · 3.51 KB
/
README.config
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
-------------------------
Config File Documentation
-------------------------
(Please have also a look at the jabber.xml manual page provided by jabberd14.)
-- <jabberd:include/> and <jabberd:cmdline/> for special config
file manipulation. <jabberd:include/> will insert an xml
file in place, where the <jabberd:include/> tag is located.
NOTE: there are a few odities that should be mentioned here.
the xml from the new file is inserted into the parent tag
that has the <jabberd:include/> tag in it. (the include tag
is removed). and the new file's xml data is inserted after
all the other children in the tag.
ALSO NOTE: if the parent tag does not match the root tag of
the inserted file, then the whole new xml file is inserted
into the first file, root tag and all. HOWEVER, if the
inserted file's root tag matches the parent tag of the include,
then only the data INSIDE the root tag is inserted. for example,
consider this file:
<jabberd>
<jabberd:include>test.xml</jabberd:include>
<service id="bar">
...
</service>
</jabberd>
-- test.xml --
<jabberd>
<service id="foo">
...
</service>
</jabberd>
in this case, since the root tag of test.xml is <jabberd/>, and
matches the parent tag that has the <jabberd:include/> tag in it,
the CONTENTS of the root tag are inserted, to create this file:
<jabberd>
<service id="foo">
...
</service>
<service id="bar">
...
</service>
</jabberd>
however, if you consider these two files:
<jabberd>
<service id="foo">
<jabberd:include>test.xml</jabberd:include>
</service>
</jabberd>
-- test.xml --
<accept>
<ip>12.34.56.78</ip>
</accept>
after test.xml is included, you end up with this xml file:
<jabberd>
<service id="foo">
<accept>
<ip>12.34.56.78</ip>
</accept>
</service>
</jabberd>
-- <jabberd:cmdline/> tag: The jabberd:cmdline tag can be used
to grab data off of the jabberd command line, and insert it
into the current tag. You can also use this tag to specify
a default value, if the commandline flag isn't given.
For example, consider the following config file:
<jabberd>
<service id="foo">
<host><jabberd:cmdline flag="h">localhost</jabberd:cmdline></host>
</service>
</jabberd>
if jabberd is run with the following line:
$ jabberd -h foo.com
The text inside of <host/> will be replaced with "foo.com",
so the resulting xml will be:
<jabberd>
<service id="foo">
<host>foo.com</host>
</service>
</jabberd>
However, if jabberd is run with this command:
$ jabberd
The <host/> tag will contain "localhost" (the default value from
above). You can specify any number of command line options. The
Only characters that have special meaning are -D, to enable debug
output, and -c, to specify a config file to use. (note that you
could use the tag <jabberd:cmdline flag="c"/> to insert the name
of the config file into your config file.