Kaynağa Gözat

Adds prosody config to conf.avail and enable it in conf.d so we don't wipe prosody config on installing meet.

j8
Damian Minkov 10 yıl önce
ebeveyn
işleme
ee324cf41f

+ 9
- 21
debian/jitsi-meet-prosody.postinst Dosyayı Görüntüle

@@ -24,27 +24,17 @@ case "$1" in
24 24
         . /etc/default/jitsi-videobridge
25 25
 
26 26
         PROSODY_CONFIG_PRESENT="true"
27
+        PROSODY_HOST_CONFIG="/etc/prosody/conf.avail/$JVB_HOSTNAME.cfg.lua"
27 28
         # if there is no prosody config extract our template
28
-        if [ ! -f /etc/prosody/prosody.cfg.lua ]; then
29
+        # check for config in conf.avail or check whether it wasn't already configured in main config
30
+        if [ ! -f $PROSODY_HOST_CONFIG ] && ! grep -q "VirtualHost \"$JVB_HOSTNAME\"" /etc/prosody/prosody.cfg.lua; then
29 31
             PROSODY_CONFIG_PRESENT="false"
30
-            gunzip -c /usr/share/doc/jitsi-meet-prosody/prosody.cfg.lua-jvb.example.gz > /etc/prosody/prosody.cfg.lua
31
-        fi
32
-
33
-        # if there is no config for our domain, lets create it
34
-        if ! grep -q "VirtualHost \"$JVB_HOSTNAME\"" /etc/prosody/prosody.cfg.lua; then
35
-
36
-            # if its not our template, save the original and extract our template
37
-            if ! grep -q "VirtualHost \"jitmeet.example.com\"" /etc/prosody/prosody.cfg.lua; then
38
-                PROSODY_CONFIG_PRESENT="false"
39
-                cp /etc/prosody/prosody.cfg.lua /etc/prosody/prosody.cfg.lua.orig
40
-                gunzip -c /usr/share/doc/jitsi-meet-prosody/prosody.cfg.lua-jvb.example.gz > /etc/prosody/prosody.cfg.lua
41
-            fi
42
-
43
-            if [ "$PROSODY_CONFIG_PRESENT" = "true" ]; then
44
-                cp /etc/prosody/prosody.cfg.lua /etc/prosody/prosody.cfg.lua.orig
32
+            cp /usr/share/doc/jitsi-meet-prosody/prosody.cfg.lua-jvb.example $PROSODY_HOST_CONFIG
33
+            sed -i "s/jitmeet.example.com/$JVB_HOSTNAME/g" $PROSODY_HOST_CONFIG
34
+            sed -i "s/jitmeetSecret/$JVB_SECRET/g" $PROSODY_HOST_CONFIG
35
+            if [ ! -f /etc/prosody/conf.d/$JVB_HOSTNAME.cfg.lua ]; then
36
+                ln -s $PROSODY_HOST_CONFIG /etc/prosody/conf.d/$JVB_HOSTNAME.cfg.lua
45 37
             fi
46
-            sed -i "s/jitmeet.example.com/$JVB_HOSTNAME/g" /etc/prosody/prosody.cfg.lua
47
-            sed -i "s/jitmeetSecret/$JVB_SECRET/g" /etc/prosody/prosody.cfg.lua
48 38
         fi
49 39
 
50 40
         if [ ! -f /var/lib/prosody/$JVB_HOSTNAME.crt ]; then
@@ -58,9 +48,7 @@ case "$1" in
58 48
         ln -sf /var/lib/prosody/$JVB_HOSTNAME.key /etc/prosody/certs/$JVB_HOSTNAME.key
59 49
         ln -sf /var/lib/prosody/$JVB_HOSTNAME.crt /etc/prosody/certs/$JVB_HOSTNAME.crt
60 50
 
61
-        if [ "$PROSODY_CONFIG_PRESENT" = "true" ]; then
62
-            invoke-rc.d prosody reload
63
-        else
51
+        if [ "$PROSODY_CONFIG_PRESENT" = "false" ]; then
64 52
             invoke-rc.d prosody restart
65 53
             invoke-rc.d jitsi-videobridge restart
66 54
         fi

+ 5
- 129
doc/debian/jitsi-meet-prosody/prosody.cfg.lua-jvb.example Dosyayı Görüntüle

@@ -1,177 +1,3 @@
1
---
2
---
3
---
4
-
5
-
6
----------- Server-wide settings ----------
7
-
8
-admins = { }
9
-daemonize = true
10
-cross_domain_bosh = true;
11
-component_ports = { 5347 }
12
-
13
-
14
---use_libevent = true
15
-
16
-modules_enabled = {
17
-
18
-        -- Generally required
19
-                "roster"; -- Allow users to have a roster. Recommended ;)
20
-                "saslauth"; -- Authentication for clients and servers. Recommended if you want to log in.
21
-                "tls"; -- Add support for secure TLS on c2s/s2s connections
22
-                "dialback"; -- s2s dialback support
23
-                "disco"; -- Service discovery
24
-                "posix"; -- POSIX functionality, sends server to background, enables syslog, etc.
25
-
26
-        -- Not essential, but recommended
27
-                "private"; -- Private XML storage (for room bookmarks, etc.)
28
-                "vcard"; -- Allow users to set vCards
29
-
30
-        -- These are commented by default as they have a performance impact
31
-                --"privacy"; -- Support privacy lists
32
-                "compression"; -- Stream compression (requires the lua-zlib package installed)
33
-
34
-        -- Nice to have
35
-                "version"; -- Replies to server version requests
36
-                "uptime"; -- Report how long server has been running
37
-                "time"; -- Let others know the time here on this server
38
-                "ping"; -- Replies to XMPP pings with pongs
39
-                "pep"; -- Enables users to publish their mood, activity, playing music and more
40
-                "register"; -- Allow users to register on this server using a client and change passwords
41
-
42
-        -- Admin interfaces
43
-                "admin_adhoc"; -- Allows administration via an XMPP client that supports ad-hoc commands
44
-                --"admin_telnet"; -- Opens telnet console interface on localhost port 5582
45
-
46
-        -- HTTP modules
47
-                "bosh"; -- Enable BOSH clients, aka "Jabber over HTTP"
48
-                --"http_files"; -- Serve static files from a directory over HTTP
49
-
50
-        -- Other specific functionality
51
-                --"groups"; -- Shared roster support
52
-                --"announce"; -- Send announcement to all online users
53
-                --"welcome"; -- Welcome users who register accounts
54
-                --"watchregistrations"; -- Alert admins of registrations
55
-                --"motd"; -- Send a message to users when they log in
56
-                --"legacyauth"; -- Legacy authentication. Only used by some old clients and bots.
57
-        -- jitmeet
58
-                --"smacks";
59
-                --"carbons";
60
-                --"mam";
61
-                --"lastactivity";
62
-                --"offline";
63
-                "pubsub";
64
-                --"adhoc";
65
-                --"websocket";
66
-                --"http_altconnect";
67
-                "turncredentials";
68
-}
69
-
70
-modules_disabled = {
71
-        -- "offline"; -- Store offline messages
72
-        -- "c2s"; -- Handle client connections
73
-        -- "s2s"; -- Handle server-to-server connections
74
-}
75
-
76
-allow_registration = false
77
-
78
-ssl = {
79
-        key = "/etc/prosody/certs/localhost.key";
80
-        certificate = "/etc/prosody/certs/localhost.crt";
81
-}
82
-
83
-
84
-
85
-
86
-
87
-
88
---s2s_insecure_domains = { "gmail.com" }
89
-
90
-
91
---s2s_secure_domains = { "jabber.org" }
92
-
93
-pidfile = "/var/run/prosody/prosody.pid"
94
-
95
-
96
-authentication = "internal_hashed"
97
-
98
-
99
---storage = "sql" -- Default is "internal"
100
-
101
---sql = { driver = "SQLite3", database = "prosody.sqlite" } -- Default. 'database' is the filename.
102
---sql = { driver = "MySQL", database = "prosody", username = "prosody", password = "secret", host = "localhost" }
103
---sql = { driver = "PostgreSQL", database = "prosody", username = "prosody", password = "secret", host = "localhost" }
104
-
105
-storage = {archive2 = "sql2"}
106
-sql = { driver = "SQLite3", database = "prosody.sqlite" }
107
-default_archive_policy = "roster"
108
-
109
-log = {
110
-        info = "/var/log/prosody/prosody.log"; -- Change 'info' to 'debug' for verbose logging
111
-        error = "/var/log/prosody/prosody.err";
112
-        "*syslog";
113
-}
114
-
115
------------ Virtual hosts -----------
116
-
117
-
118 1
 VirtualHost "jitmeet.example.com"
119 2
         -- enabled = false -- Remove this line to enable this host
120 3
         authentication = "anonymous"
@@ -183,26 +9,11 @@ VirtualHost "jitmeet.example.com"
183 9
                 key = "/etc/prosody/certs/jitmeet.example.com.key";
184 10
                 certificate = "/etc/prosody/certs/jitmeet.example.com.crt";
185 11
         }
186
-
187
------- Components ------
188
-
189
----Set up a MUC (multi-user chat) room server on conference.example.com:
190
---Component "conference.example.com" "muc"
191
-
192
---Component "proxy.example.com" "proxy65"
193
-
194
----Set up an external component (default component port is 5347)
195
---
196
---
197
---Component "gateway.example.com"
12
+        -- we need bosh
13
+        modules_enabled = {
14
+            "bosh";
15
+            "pubsub";
16
+        }
198 17
 
199 18
 Component "conference.jitmeet.example.com" "muc"
200 19
 

Loading…
İptal
Kaydet