Mercurial > prosody-modules
annotate mod_reload_components/README.markdown @ 4047:36b6e3e3f9e2
mod_conversejs: Disable automatic BOSH/WS endpoint discovery
Converse.js 7.0 will enable this by default, but when using this module
the BOSH and WebSocket endpoints are provided in the generated HTML, so
automatic discovery is not needed and unlikely to work without an
additional module.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 18 Jun 2020 15:24:34 +0200 |
parents | 85d04dd87f14 |
children |
rev | line source |
---|---|
2391
85d04dd87f14
mod_reload_components: add new module and README file.
Camilo <camilo@camilo.fm>
parents:
diff
changeset
|
1 Introduction |
85d04dd87f14
mod_reload_components: add new module and README file.
Camilo <camilo@camilo.fm>
parents:
diff
changeset
|
2 ============ |
85d04dd87f14
mod_reload_components: add new module and README file.
Camilo <camilo@camilo.fm>
parents:
diff
changeset
|
3 |
85d04dd87f14
mod_reload_components: add new module and README file.
Camilo <camilo@camilo.fm>
parents:
diff
changeset
|
4 This module allows to load/unload external components after they have |
85d04dd87f14
mod_reload_components: add new module and README file.
Camilo <camilo@camilo.fm>
parents:
diff
changeset
|
5 been added/removed to a configuration file. It is necessary to explicitly |
85d04dd87f14
mod_reload_components: add new module and README file.
Camilo <camilo@camilo.fm>
parents:
diff
changeset
|
6 initiate a reload on Prosody either via prosodyctl reload or config:reload(). |
85d04dd87f14
mod_reload_components: add new module and README file.
Camilo <camilo@camilo.fm>
parents:
diff
changeset
|
7 |
85d04dd87f14
mod_reload_components: add new module and README file.
Camilo <camilo@camilo.fm>
parents:
diff
changeset
|
8 Example 1: |
85d04dd87f14
mod_reload_components: add new module and README file.
Camilo <camilo@camilo.fm>
parents:
diff
changeset
|
9 -------- |
85d04dd87f14
mod_reload_components: add new module and README file.
Camilo <camilo@camilo.fm>
parents:
diff
changeset
|
10 If Prosody has started with this configuration file: |
85d04dd87f14
mod_reload_components: add new module and README file.
Camilo <camilo@camilo.fm>
parents:
diff
changeset
|
11 |
85d04dd87f14
mod_reload_components: add new module and README file.
Camilo <camilo@camilo.fm>
parents:
diff
changeset
|
12 ``` {.lua} |
85d04dd87f14
mod_reload_components: add new module and README file.
Camilo <camilo@camilo.fm>
parents:
diff
changeset
|
13 VirtualHost "example.com" |
85d04dd87f14
mod_reload_components: add new module and README file.
Camilo <camilo@camilo.fm>
parents:
diff
changeset
|
14 authentication = "internal_plain" |
85d04dd87f14
mod_reload_components: add new module and README file.
Camilo <camilo@camilo.fm>
parents:
diff
changeset
|
15 |
85d04dd87f14
mod_reload_components: add new module and README file.
Camilo <camilo@camilo.fm>
parents:
diff
changeset
|
16 Component "a.example.com" |
85d04dd87f14
mod_reload_components: add new module and README file.
Camilo <camilo@camilo.fm>
parents:
diff
changeset
|
17 component_secret = "a" |
85d04dd87f14
mod_reload_components: add new module and README file.
Camilo <camilo@camilo.fm>
parents:
diff
changeset
|
18 |
85d04dd87f14
mod_reload_components: add new module and README file.
Camilo <camilo@camilo.fm>
parents:
diff
changeset
|
19 Component "b.example.com" |
85d04dd87f14
mod_reload_components: add new module and README file.
Camilo <camilo@camilo.fm>
parents:
diff
changeset
|
20 component_secret = "b" |
85d04dd87f14
mod_reload_components: add new module and README file.
Camilo <camilo@camilo.fm>
parents:
diff
changeset
|
21 ``` |
85d04dd87f14
mod_reload_components: add new module and README file.
Camilo <camilo@camilo.fm>
parents:
diff
changeset
|
22 |
85d04dd87f14
mod_reload_components: add new module and README file.
Camilo <camilo@camilo.fm>
parents:
diff
changeset
|
23 And the file has changed manually or dynamically to: |
85d04dd87f14
mod_reload_components: add new module and README file.
Camilo <camilo@camilo.fm>
parents:
diff
changeset
|
24 |
85d04dd87f14
mod_reload_components: add new module and README file.
Camilo <camilo@camilo.fm>
parents:
diff
changeset
|
25 ``` {.lua} |
85d04dd87f14
mod_reload_components: add new module and README file.
Camilo <camilo@camilo.fm>
parents:
diff
changeset
|
26 VirtualHost "example.com" |
85d04dd87f14
mod_reload_components: add new module and README file.
Camilo <camilo@camilo.fm>
parents:
diff
changeset
|
27 authentication = "internal_plain" |
85d04dd87f14
mod_reload_components: add new module and README file.
Camilo <camilo@camilo.fm>
parents:
diff
changeset
|
28 |
85d04dd87f14
mod_reload_components: add new module and README file.
Camilo <camilo@camilo.fm>
parents:
diff
changeset
|
29 Component "a.example.com" |
85d04dd87f14
mod_reload_components: add new module and README file.
Camilo <camilo@camilo.fm>
parents:
diff
changeset
|
30 component_secret = "a" |
85d04dd87f14
mod_reload_components: add new module and README file.
Camilo <camilo@camilo.fm>
parents:
diff
changeset
|
31 |
85d04dd87f14
mod_reload_components: add new module and README file.
Camilo <camilo@camilo.fm>
parents:
diff
changeset
|
32 Component "c.example.com" |
85d04dd87f14
mod_reload_components: add new module and README file.
Camilo <camilo@camilo.fm>
parents:
diff
changeset
|
33 component_secret = "c" |
85d04dd87f14
mod_reload_components: add new module and README file.
Camilo <camilo@camilo.fm>
parents:
diff
changeset
|
34 ``` |
85d04dd87f14
mod_reload_components: add new module and README file.
Camilo <camilo@camilo.fm>
parents:
diff
changeset
|
35 |
85d04dd87f14
mod_reload_components: add new module and README file.
Camilo <camilo@camilo.fm>
parents:
diff
changeset
|
36 Then, the following actions will occur if this module is loaded: |
85d04dd87f14
mod_reload_components: add new module and README file.
Camilo <camilo@camilo.fm>
parents:
diff
changeset
|
37 |
85d04dd87f14
mod_reload_components: add new module and README file.
Camilo <camilo@camilo.fm>
parents:
diff
changeset
|
38 1. The component c.example.com will be loaded and start bouncing for |
85d04dd87f14
mod_reload_components: add new module and README file.
Camilo <camilo@camilo.fm>
parents:
diff
changeset
|
39 authentication. |
85d04dd87f14
mod_reload_components: add new module and README file.
Camilo <camilo@camilo.fm>
parents:
diff
changeset
|
40 2. The component b.example.com will be unloaded and deactivated. The |
85d04dd87f14
mod_reload_components: add new module and README file.
Camilo <camilo@camilo.fm>
parents:
diff
changeset
|
41 connection with it will not be closed, but no further actions will be |
85d04dd87f14
mod_reload_components: add new module and README file.
Camilo <camilo@camilo.fm>
parents:
diff
changeset
|
42 executed on Prosody. |
85d04dd87f14
mod_reload_components: add new module and README file.
Camilo <camilo@camilo.fm>
parents:
diff
changeset
|
43 |
85d04dd87f14
mod_reload_components: add new module and README file.
Camilo <camilo@camilo.fm>
parents:
diff
changeset
|
44 Example 2: |
85d04dd87f14
mod_reload_components: add new module and README file.
Camilo <camilo@camilo.fm>
parents:
diff
changeset
|
45 -------- |
85d04dd87f14
mod_reload_components: add new module and README file.
Camilo <camilo@camilo.fm>
parents:
diff
changeset
|
46 |
85d04dd87f14
mod_reload_components: add new module and README file.
Camilo <camilo@camilo.fm>
parents:
diff
changeset
|
47 If Prosody has started with this configuration file: |
85d04dd87f14
mod_reload_components: add new module and README file.
Camilo <camilo@camilo.fm>
parents:
diff
changeset
|
48 |
85d04dd87f14
mod_reload_components: add new module and README file.
Camilo <camilo@camilo.fm>
parents:
diff
changeset
|
49 ``` {.lua} |
85d04dd87f14
mod_reload_components: add new module and README file.
Camilo <camilo@camilo.fm>
parents:
diff
changeset
|
50 VirtualHost "example.com" |
85d04dd87f14
mod_reload_components: add new module and README file.
Camilo <camilo@camilo.fm>
parents:
diff
changeset
|
51 authentication = "internal_plain" |
85d04dd87f14
mod_reload_components: add new module and README file.
Camilo <camilo@camilo.fm>
parents:
diff
changeset
|
52 |
85d04dd87f14
mod_reload_components: add new module and README file.
Camilo <camilo@camilo.fm>
parents:
diff
changeset
|
53 Component "a.example.com" |
85d04dd87f14
mod_reload_components: add new module and README file.
Camilo <camilo@camilo.fm>
parents:
diff
changeset
|
54 component_secret = "a" |
85d04dd87f14
mod_reload_components: add new module and README file.
Camilo <camilo@camilo.fm>
parents:
diff
changeset
|
55 ``` |
85d04dd87f14
mod_reload_components: add new module and README file.
Camilo <camilo@camilo.fm>
parents:
diff
changeset
|
56 |
85d04dd87f14
mod_reload_components: add new module and README file.
Camilo <camilo@camilo.fm>
parents:
diff
changeset
|
57 And the file has changed manually or dynamically to: |
85d04dd87f14
mod_reload_components: add new module and README file.
Camilo <camilo@camilo.fm>
parents:
diff
changeset
|
58 |
85d04dd87f14
mod_reload_components: add new module and README file.
Camilo <camilo@camilo.fm>
parents:
diff
changeset
|
59 ``` {.lua} |
85d04dd87f14
mod_reload_components: add new module and README file.
Camilo <camilo@camilo.fm>
parents:
diff
changeset
|
60 VirtualHost "example.com" |
85d04dd87f14
mod_reload_components: add new module and README file.
Camilo <camilo@camilo.fm>
parents:
diff
changeset
|
61 authentication = "internal_plain" |
85d04dd87f14
mod_reload_components: add new module and README file.
Camilo <camilo@camilo.fm>
parents:
diff
changeset
|
62 |
85d04dd87f14
mod_reload_components: add new module and README file.
Camilo <camilo@camilo.fm>
parents:
diff
changeset
|
63 Component "a.example.com" |
85d04dd87f14
mod_reload_components: add new module and README file.
Camilo <camilo@camilo.fm>
parents:
diff
changeset
|
64 component_secret = "a" |
85d04dd87f14
mod_reload_components: add new module and README file.
Camilo <camilo@camilo.fm>
parents:
diff
changeset
|
65 |
85d04dd87f14
mod_reload_components: add new module and README file.
Camilo <camilo@camilo.fm>
parents:
diff
changeset
|
66 VirtualHost "newexample.com" |
85d04dd87f14
mod_reload_components: add new module and README file.
Camilo <camilo@camilo.fm>
parents:
diff
changeset
|
67 authentication = "internal_plain" |
85d04dd87f14
mod_reload_components: add new module and README file.
Camilo <camilo@camilo.fm>
parents:
diff
changeset
|
68 |
85d04dd87f14
mod_reload_components: add new module and README file.
Camilo <camilo@camilo.fm>
parents:
diff
changeset
|
69 Component "a.newexample.com" |
85d04dd87f14
mod_reload_components: add new module and README file.
Camilo <camilo@camilo.fm>
parents:
diff
changeset
|
70 component_secret = "a" |
85d04dd87f14
mod_reload_components: add new module and README file.
Camilo <camilo@camilo.fm>
parents:
diff
changeset
|
71 ``` |
85d04dd87f14
mod_reload_components: add new module and README file.
Camilo <camilo@camilo.fm>
parents:
diff
changeset
|
72 |
85d04dd87f14
mod_reload_components: add new module and README file.
Camilo <camilo@camilo.fm>
parents:
diff
changeset
|
73 Then, the following actions will occur if this module is loaded: |
85d04dd87f14
mod_reload_components: add new module and README file.
Camilo <camilo@camilo.fm>
parents:
diff
changeset
|
74 |
85d04dd87f14
mod_reload_components: add new module and README file.
Camilo <camilo@camilo.fm>
parents:
diff
changeset
|
75 1. The component a.newexample.com will be loaded and start bouncing for |
85d04dd87f14
mod_reload_components: add new module and README file.
Camilo <camilo@camilo.fm>
parents:
diff
changeset
|
76 authentication. Note that its respective VirtualHost is not loaded. Bad |
85d04dd87f14
mod_reload_components: add new module and README file.
Camilo <camilo@camilo.fm>
parents:
diff
changeset
|
77 things may happen. |
85d04dd87f14
mod_reload_components: add new module and README file.
Camilo <camilo@camilo.fm>
parents:
diff
changeset
|
78 |
85d04dd87f14
mod_reload_components: add new module and README file.
Camilo <camilo@camilo.fm>
parents:
diff
changeset
|
79 Usage |
85d04dd87f14
mod_reload_components: add new module and README file.
Camilo <camilo@camilo.fm>
parents:
diff
changeset
|
80 ===== |
85d04dd87f14
mod_reload_components: add new module and README file.
Camilo <camilo@camilo.fm>
parents:
diff
changeset
|
81 |
85d04dd87f14
mod_reload_components: add new module and README file.
Camilo <camilo@camilo.fm>
parents:
diff
changeset
|
82 Copy the module folder into your Prosody modules directory. Place the |
85d04dd87f14
mod_reload_components: add new module and README file.
Camilo <camilo@camilo.fm>
parents:
diff
changeset
|
83 module between your enabled modules either into the global or a vhost |
85d04dd87f14
mod_reload_components: add new module and README file.
Camilo <camilo@camilo.fm>
parents:
diff
changeset
|
84 section. |
85d04dd87f14
mod_reload_components: add new module and README file.
Camilo <camilo@camilo.fm>
parents:
diff
changeset
|
85 |
85d04dd87f14
mod_reload_components: add new module and README file.
Camilo <camilo@camilo.fm>
parents:
diff
changeset
|
86 No configuration directives are needed |
85d04dd87f14
mod_reload_components: add new module and README file.
Camilo <camilo@camilo.fm>
parents:
diff
changeset
|
87 |
85d04dd87f14
mod_reload_components: add new module and README file.
Camilo <camilo@camilo.fm>
parents:
diff
changeset
|
88 Info |
85d04dd87f14
mod_reload_components: add new module and README file.
Camilo <camilo@camilo.fm>
parents:
diff
changeset
|
89 ==== |
85d04dd87f14
mod_reload_components: add new module and README file.
Camilo <camilo@camilo.fm>
parents:
diff
changeset
|
90 |
85d04dd87f14
mod_reload_components: add new module and README file.
Camilo <camilo@camilo.fm>
parents:
diff
changeset
|
91 - 0.9, works |