The <jabberd:cmdline/> Tag
The
<jabberd:cmdline/>
tag was mentioned in Chapter 3 as a way of providing a command-line
hook into the configuration: values stored in the XML could be overridden
by command-line switches used when invoking jabberd.
The tag is used in the standard XML configuration (see Figure 4-3) to allow replacement of the hostname and spool directory:
<host><jabberd:cmdline flag="h">yak</jabberd:cmdline></host>
and:
<spool><jabberd:cmdline flag='s'>./spool</jabberd:cmdline></spool>
In fact, this tag can be used in most places in the XML. So if, for example, you have a requirement to modify (respecify) the error and record log files for each jabberd invocation, you can do something like this:
<log id='elogger'> <host/> <logtype/> <format>%d: [%t] (%h): %s</format> <file><jabberd:cmdline flag="e">error.log</jabberd:cmdline></file> <stderr/> </log>
and then override the value error.log with something else
at invocation time:
yak:~/jabber-1.4.1$ ./jabberd/jabberd -e error_log.txt &
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access