Update README files to show configuration file as YAML (#86)

This commit is contained in:
Badlop 2015-03-13 11:54:26 +01:00
parent 7870f77392
commit bdfe82ce79
13 changed files with 83 additions and 117 deletions

View File

@ -21,7 +21,7 @@ ejabberd has to validate it externally.
### How to enable
The simplest way is to just replace default `auth_method` option in
`ejabberd.cfg` with `{auth_method, http}`.
`ejabberd.yml` with `auth_method: http`.
However, enabling the module **is not enough!** Please follow
instructions below.
@ -29,12 +29,12 @@ instructions below.
### Configuration options
`ejabberd_auth_http` requires some parameters to function
properly. The following options can be set in `auth_opts` tuple in
`ejabberd.cfg`:
properly. The following options can be set in `auth_opts` in
`ejabberd.yml`:
* `host` (mandatory, `string`) - consists of protocol, hostname (or IP) and port (optional). Examples:
* `{host, "http://localhost:12000"}`
* `{host, "https://10.20.30.40"}`
* `host: "http://localhost:12000"`
* `host: "https://10.20.30.40"`
* `connection_pool_size` (optional, `integer`, default: 10) - the
number of connections open to auth service
* `connection_opts` (optional, default: `[]`) - extra options for

View File

@ -4,21 +4,14 @@
Author: Badlop
Homepage: http://www.ejabberd.im/mod_admin_extra
Requirements: ejabberd 2.1.10 newer
This module DOES NOT WORK with any ejabberd 2.0.x or older.
If you have some ejabberd 2.0.x, you can still use mod_ctlextra.
CONFIGURATION
=============
Add the module to your ejabberd.cfg, on the modules section:
{modules, [
...
{mod_admin_extra, []},
...
]}.
Add the module to your ejabberd.yml, on the modules section:
modules:
mod_admin_extra: {}
The configurable options are:
- module_resource:
@ -30,16 +23,18 @@ In this example configuration, the users vcards can only be modified
by executing mod_admin_extra commands.
Notice that this needs the patch
https://support.process-one.net/browse/EJAB-797
{acl, adminextraresource, {resource, "modadminextraf8x,31ad"}}.
{access, vcard_set, [
{allow, adminextraresource},
{deny, all}]
}.
{modules, [
{mod_admin_extra, [ {module_resource, "modadminextraf8x,31ad"} ]},
{mod_vcard, [ {access_set, vcard_set} ]},
...
]}.
acl:
adminextraresource:
resource: "modadminextraf8x,31ad"
access:
vcard_set:
adminextraresource: allow
all: deny
modules:
mod_admin_extra:
module_resource: "modadminextraf8x,31ad"
mod_vcard:
access_set: vcard_set
USAGE

View File

@ -3,7 +3,6 @@
http://www.ejabberd.im/mod_cron
Author: Badlop
Requirements: ejabberd git master
This module allows advanced ejabberd administrators to schedule commands for

View File

@ -22,7 +22,7 @@ Note: to log the failed authentication attempts, you need to patch ejabberd.
1 Copy this file to ejabberd/src/mod_logsession.erl
2 Recompile ejabberd
3 Add to ejabberd.cfg, 'modules' section the basic configuration:
3 Add to ejabberd.yml, 'modules' section the basic configuration:
mod_logsession: {}
4 With this configuration, the log files are:
/tmp/ejabberd_logsession_@HOST@.log

View File

@ -2,7 +2,6 @@
mod_message_log - Log one line per message transmission
Author: Holger Weiss <holger@zedat.fu-berlin.de>
Requirements: ejabberd 13.x or newer
DESCRIPTION

View File

@ -4,7 +4,6 @@
Homepage: http://www.ejabberd.im/mod_muc_admin
Author: Badlop
Requirements: ejabberd trunk SVN 1699 or newer
This module implements several ejabberd commands that can be
@ -17,12 +16,9 @@ rooms.
CONFIGURATION
=============
Add the module to your ejabberd.cfg, on the modules section:
{modules, [
...
{mod_muc_admin, []},
...
]}.
Add the module to your ejabberd.yml, on the modules section:
modules:
mod_muc_admin: {}
EJABBERD COMMANDS

View File

@ -4,7 +4,6 @@
Homepage: http://ejabberd.im/mod_muc_log_http
Author: Badlop
Requirement: ejabberd git master
DESCRIPTION

View File

@ -4,7 +4,6 @@
Homepage: http://ejabberd.jabber.ru/mod_multicast
Author: Badlop
Module for ejabberd master branch
DESCRIPTION
@ -20,8 +19,8 @@ The development of this module is included on a Google Summer of Code 2007 proje
1. Compile the module.
2. Copy the binary files to ejabberd ebin directory.
3. Edit ejabberd.cfg and add the module to the list of modules:
{mod_multicast, []},
3. Edit ejabberd.yml and add the module to the list of modules:
mod_multicast: {}
4. Start ejabberd.
@ -48,31 +47,34 @@ limits:
EXAMPLE CONFIGURATION
---------------------
% Only admins can send packets to multicast service
{access, multicast, [{allow, admin}, {deny, all}]}.
# Only admins can send packets to multicast service
access:
multicast:
admin: allow
all: deny
% If you want to allow all your users:
%{access, multicast, [{allow, all}]}.
# If you want to allow all your users:
access:
multicast:
all: allow
% This allows both admins and remote users to send packets,
% but does not allow local users
%{acl, allservers, {server_glob, "*"}}.
%{access, multicast, [{allow, admin}, {deny, local}, {allow, allservers}]}.
# This allows both admins and remote users to send packets,
# but does not allow local users
acl:
allservers:
server_glob: "*"
access:
multicast:
admin: allow
local: deny
allservers: allow
{modules, [
...
{mod_multicast, [
%{host, "multicast.example.org"},
{access, multicast},
{limits, [
{local, message, 40},
{local, presence, infinite},
{remote, message, 150}
]}
]},
...
]}.
modules:
mod_multicast:
host: "multicast.example.org"
access: multicast
limits, "> [ {local,message,40}, {local,presence,infinite}, {remote,message,150} ]."
TO DO

View File

@ -4,8 +4,6 @@
Author: Nolan Eakins <sneakin@semanticgap.com>
Copyright (C) 2008 Nolan Eakins
Requirements: ejabberd trunk SVN 2025 (ejabberd 2.1.0, once released)
This is an ejabberd module that adds an HTTP handler that allows HTTP
@ -20,27 +18,21 @@ This module can also be used as a frontend to execute ejabberd commands.
=============
To use this module, follow the general build instructions, and configure
in ejabberd.cfg as described.
in ejabberd.yml as described.
Enable the module:
{modules,
[
{mod_rest, [ {allowed_ips, [ {127,0,0,1} ]} ]},
...
]
}.
modules:
mod_rest:
allowed_ips:
- "> {127,0,0,1} ."
And enable the HTTP request handler in the listen section:
{listen,
[
...
{5285, ejabberd_http, [
{request_handlers, [
{["rest"], mod_rest}
]}
]}
]
}.
listen:
-
port: 5285
module: ejabberd_http
request_handlers:
"/rest": mod_rest
With that configuration, you can send HTTP POST requests to the URL:
http://localhost:5285/rest
@ -70,7 +62,7 @@ Configurable options:
There is more information about AccessCommands in the ejabberd Guide.
Default value: []
Complex example configuration:
Complex example configuration (works only when set in an old-format ejabberd.cfg file:
{modules,
[
{mod_rest, [

View File

@ -2,13 +2,11 @@
mod_s2s_log
-----------
Requirements: ejabberd SVN r1235 trunk or 2.0.x branch
(ejabberd 2.0.1 or newer is required)
This module can be use to keep a track of other XMPP servers your server has
been connected with.
You can use it by adding the following line in the modules section of
ejabberd.cfg:
{mod_s2s_log, [{filename, "/path/to/s2s.log"}]}
ejabberd.yml:
mod_s2s_log:
filename: "/path/to/s2s.log"

View File

@ -62,6 +62,6 @@ administrators.
BASIC CONFIGURATION
===================
Add the module to your ejabberd.cfg, on the modules section:
Add the module to your ejabberd.yml, on the modules section:
modules:
mod_shcommands: {}

View File

@ -3,7 +3,6 @@
Homepage: http://www.ejabberd.im/mod_statsdx
Author: Badlop
Requirements: ejabberd 2.1.x
mod_statsdx
@ -16,11 +15,9 @@ Web Admin and two ejabberd commands to view the information.
CONFIGURE
---------
Enable the module in ejabberd.cfg for example with a basic configuration:
{modules, [
...
{mod_statsdx, []}
]}.
Enable the module in ejabberd.yml for example with a basic configuration:
modules:
mod_statsdx: {}
Configurable options:
hooks: Set to 'true' to enable hooks and related statistics.
@ -32,10 +29,9 @@ Configurable options:
EXAMPLE CONFIGURATION
---------------------
{modules, [
...
{mod_statsdx, [{hooks, true}]}
]}.
modules:
mod_statsdx:
hooks: true
FEATURE REQUESTS
@ -65,11 +61,9 @@ text file with descriptions and raw text file (for MRTG, RRDTool...).
This module requires mod_statsdx.
Enable the module in ejabberd.cfg for example with a basic configuration:
{modules, [
...
{mod_stats2file, []}
]}.
Enable the module in ejabberd.yml for example with a basic configuration:
modules:
mod_stats2file: {}
Configurable options:
interval: Time between updates, in minutes (default: 5)
@ -82,14 +76,11 @@ Configurable options:
EXAMPLE CONFIGURATION
---------------------
{modules, [
...
{mod_stats2file, [{interval, 60},
{type, txt},
{split, true},
{basefilename, "/var/www/stats"},
{hosts, ["localhost", "server3.com"]}
]}
]}.
modules:
mod_stats2file:
interval: 60
type: txt
split: true
basefilename: "/var/www/stats"
hosts: ["localhost", "server3.com"]

View File

@ -32,7 +32,7 @@ No web server, database, additional libraries or programs are required.
3. Copy the directory data/pixmaps to a directory you prefer.
4. Edit ejabberd.cfg and add the HTTP and module definitions:
4. Edit ejabberd.yml and add the HTTP and module definitions:
listen:
-
@ -43,7 +43,6 @@ listen:
"presence": mod_webpresence
modules:
[...]
mod_webpresence:
pixmaps_path: "/path/to/pixmaps"
@ -122,12 +121,10 @@ listen:
-
port: 5280
module: ejabberd_http
[...]
request_handlers:
"presence": mod_webpresence
modules:
[...]
mod_webpresence:
pixmaps_path: "/path/to/pixmaps"
@ -139,12 +136,10 @@ listen:
-
port: 80
module: ejabberd_http
[...]
request_handlers:
"status": mod_webpresence
modules:
[...]
mod_webpresence:
host: "webstatus.@HOST@"
access: local