diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2007-06-04 12:35:54 +0000 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2007-06-04 12:35:54 +0000 |
commit | e7ffd40909f60b2230879e2767ad0a057198eb9f (patch) | |
tree | 4572199ebe2170e6abc97b77d4e1c4e496009079 /doc/gsc.texi | |
parent | c4687307a4e3f4d08d5da97c0537fe0ce95960d1 (diff) | |
download | gsc-e7ffd40909f60b2230879e2767ad0a057198eb9f.tar.gz gsc-e7ffd40909f60b2230879e2767ad0a057198eb9f.tar.bz2 |
Implement long options, running instance control and component dependency checking
git-svn-id: file:///svnroot/gsc/trunk@254 d2de0444-eb31-0410-8365-af798a554d48
Diffstat (limited to 'doc/gsc.texi')
-rw-r--r-- | doc/gsc.texi | 104 |
1 files changed, 78 insertions, 26 deletions
diff --git a/doc/gsc.texi b/doc/gsc.texi index 264004d..4e64ce3 100644 --- a/doc/gsc.texi +++ b/doc/gsc.texi @@ -1136,29 +1136,51 @@ precompiled defaults. Otherwise, the following command line options are understood: @table @option -@item -c @var{file} +@item --config-file=@var{file} +@itemx -c @var{file} Use @var{file} as the main configuration file. - -@item -D + +@item --debug +@itemx -D Increase debugging level. - -@item -f + +@item --foreground +@itemx -f Do not disconnect from the controlling terminal, but run in foreground mode instead. This option is mainly useful for debugging. It implies @option{-e} (see below). -@item -e +@item --force + Attempt to start up even if another instance of @command{jabberd} +seems to be running. + +@item --stderr +@itemx -e Print all diagnostics on the standard output. - -@item -h + +@item --help +@itemx -h Display a terse usage summary. - -@item -p @var{file} - Write master process @acronym{ID} to @var{file}. This option -overrides @option{pdifile} configuration file statement (see the next -section). -@item -v +@item --restart @var{tag} [@var{tags}...] +@itemx -r @var{tag} [@var{tag}...] + Restart named components. Any number of arguments can be +specified. Each @var{tag} must correspond to a valid tag in +@file{jabberd.cfg} file. + +@item --status + Display information about the running instance. Return 0 if the +instance is running, 1 otherwise. + +@item --stop + Stop the running instance by sending it the @acronym{SIGTERM} signal. + +@item --reload +@item --hup + Restart the running instance by sending it the @acronym{SIGHUP} signal. + +@item --version +@itemx -v Print program version and licensing information and exit. @end table @@ -1198,13 +1220,14 @@ file, and will be shut down in the reverse order. The @code{prog} statement is designed expressly to start jabber core programs, it should not be used to start third-party programs. - To start third-party programs, e.g. transports, use @code{exec} + To start third-party programs, e.g. transports, use @code{transport} statement. It is a compound statement that has the following structure: @smallexample -exec @var{tag} +transport @var{tag} command @var{command-line} + depend @var{modlist} stdout @var{prio} stderr @var{prio} end @@ -1226,8 +1249,9 @@ word of @var{command-line}. following statement: @smallexample -exec ggtrans +transport ggtrans command /usr/local/sbin/jggtrans -f + depend all stdout notice stderr notice end @@ -1271,15 +1295,16 @@ statements in detail. @node cfgstat @subsubsection Configuration File Statements -@deffn {Jabber Statement} exec [@var{tag}] +@deffn {Jabber Statement} transport [@var{tag}] Schedule a third-party program (e.g. a transport) for startup. @var{tag} specifies the prefix to identify this program in the -diagnostic poutput. The @code{exec} statement is a block statement +diagnostic poutput. The @code{transport} statement is a block statement that have the following structure: @smallexample -exec @var{tag} +transport @var{tag} command @var{command-line} + depend @var{component-list} stdout @var{prio} stderr @var{prio} facility @var{fac} @@ -1288,15 +1313,28 @@ end The subordinate statements are: -@deffn {exec statement} command @var{command-line} +@deffn {transport statement} command @var{command-line} Set the command line of the transport. @var{command-line} is parsed much the same way as in shell, except that no variable substitution takes place. @end deffn +@deffn {transport statement} depend @var{component-list} +Declare that this module depends on the components listed in +@var{component-list}. Whenever one of these components is restarted, +the transport will be restarted as well. + +@var{component-list} is either a whitespace-separated list of +components, or one of the following words: @samp{all}, meaning that +this transport depends on all core components started before it, and +@samp{none}, meaning that it does not depend on anything. + +The default is @samp{all}. +@end deffn + @anchor{stdout} -@deffn {exec statement} stdout @var{prio} -@deffnx {exec statement} stderr @var{prio} +@deffn {transport statement} stdout @var{prio} +@deffnx {transport statement} stderr @var{prio} Redirect program's standard output (or error, in case of @code{stderr}) to the given syslog priority. Allowed values for @var{prio} are: @samp{EMERG}, @samp{ALERT}, @samp{CRIT}, @samp{ERR}, @@ -1305,7 +1343,7 @@ optionally prefixed with @samp{LOG_}. The string matching is case-insensitive. @end deffn -@deffn {exec statement} facility @var{facility} +@deffn {transport statement} facility @var{facility} This statement does nothing. It is reserved for future use. @end deffn @@ -1319,6 +1357,20 @@ privileges. Write master process @acronym{ID} to @var{file} @end deffn +@deffn {Jabber Statement} ctlfile @var{file} +Set location of the control file. This file is used to pass additional +information to the running daemon program (e.g., when running +@command{jabberd --restart @var{comp}}). The default value is +@file{/usr/local/var/jabberd/.jabberd.ctl}. +@end deffn + +@deffn {Jabber Statement} statfile @var{file} +Set location of the statistics output file. This file is used to pass +statistics information from the running daemon program (e.g., when running +@command{jabberd --status}). The default value is +@file{/usr/local/var/jabberd/.jabberd.stat}. +@end deffn + @deffn {Jabber Statement} prog @var{command} [@var{config-file}] Schedule a jabber core program for startup. The program name is given by @var{command} argument. Optional @var{config-file} gives the @@ -1381,14 +1433,14 @@ prog s2s /usr/local/etc/jabberd/s2s.xml prog c2s /usr/local/etc/jabberd/c2s.xml # @r{Start @acronym{GG} transport and capture its output:} -exec ggtrans +transport ggtrans command /usr/local/sbin/jggtrans -f stdout notice stderr notice end # @r{Start @acronym{ICQ} transport and capture its output:} -exec jit +transport jit command /usr/local/bin/jabberd-jit -c /usr/local/etc/jit.xml stdout notice stderr notice |