Ejabberd runtime configuration: Unterschied zwischen den Versionen

Aus Free Software
Zur Navigation springen Zur Suche springen
Zeile 1: Zeile 1:
You can change lots of the configuration at runtime either via the webinterface or by attaching to the ejabberd node. You can do the latter by running "ejabberdctl debug", where you can run any of the following commands:
You can change lots of the configuration at runtime either via the webinterface or by attaching to the ejabberd node. You can do the latter by running "ejabberdctl debug", where you can run any of the following commands:


; Check Syntax of file : <pre>file:consult("/etc/ejabberd/ejabberd.cfg").</pre>
; Check Syntax of file : <pre>p1_yaml:decode_from_file(<<"/etc/ejabberd/ejabberd.yml">>, [plain_as_atom]).</pre>
; Reload config-file : <pre>ejabberd_config:load_file("/etc/ejabberd/ejabberd.cfg").</pre>Note that this only updates ACL and Shapers. Listening ports, virtual hosts, modules and all major options will not change.
; Reload config-file : <pre>ejabberd_config:load_file("/etc/ejabberd/ejabberd.cfg").</pre>Note that this only updates ACL and Shapers. Listening ports, virtual hosts, modules and all major options will not change.
; Add codepath : <pre>code:add_patha("/usr/lib/erlang/lib/xmlrpc-1.13/").</pre>
; Add codepath : <pre>code:add_patha("/usr/lib/erlang/lib/xmlrpc-1.13/").</pre>

Version vom 17. Juli 2014, 11:05 Uhr

You can change lots of the configuration at runtime either via the webinterface or by attaching to the ejabberd node. You can do the latter by running "ejabberdctl debug", where you can run any of the following commands:

Check Syntax of file
p1_yaml:decode_from_file(<<"/etc/ejabberd/ejabberd.yml">>, [plain_as_atom]).
Reload config-file
ejabberd_config:load_file("/etc/ejabberd/ejabberd.cfg").
Note that this only updates ACL and Shapers. Listening ports, virtual hosts, modules and all major options will not change.
Add codepath
code:add_patha("/usr/lib/erlang/lib/xmlrpc-1.13/").
Set loglevel
ejabberd_loglevel:set(4).

Note: A loglevel of 5 sometimes causes additional debug messages on stdout (which breaks munin plugins).
Get loglevel
ejabberd_loglevel:get().
Reload module
l(mod_version).
Where mod_version is the module you want to reload.
Recompile module
c(mod_version).
Where mod_version is the module you want to compile. You will still have to reload the module.

Scripting

To execute e.g. mnesia:info():

#!/usr/bin/env escript
%%! -sname admin@titan

main(_Args) ->
    Node = 'ejabberd@titan',
    Module = mnesia,
    Function = info,
    Arguments = [],

    rpc:call(Node, Module, Function, Arguments).

See also