浏览代码

Migrate to using mucs for jvb.

master
damencho 5 年前
父节点
当前提交
d9282f873c
共有 2 个文件被更改,包括 20 次插入4 次删除
  1. 12
    1
      debian/jitsi-meet-prosody.postinst
  2. 8
    3
      doc/debian/jitsi-meet-prosody/prosody.cfg.lua-jvb.example

+ 12
- 1
debian/jitsi-meet-prosody.postinst 查看文件

@@ -95,7 +95,6 @@ case "$1" in
95 95
             mkdir -p /etc/prosody/conf.d/
96 96
             cp /usr/share/jitsi-meet-prosody/prosody.cfg.lua-jvb.example $PROSODY_HOST_CONFIG
97 97
             sed -i "s/jitmeet.example.com/$JVB_HOSTNAME/g" $PROSODY_HOST_CONFIG
98
-            sed -i "s/jitmeetSecret/$JVB_SECRET/g" $PROSODY_HOST_CONFIG
99 98
             sed -i "s/focusSecret/$JICOFO_SECRET/g" $PROSODY_HOST_CONFIG
100 99
             sed -i "s/focusUser/$JICOFO_AUTH_USER/g" $PROSODY_HOST_CONFIG
101 100
             if [ ! -f /etc/prosody/conf.d/$JVB_HOSTNAME.cfg.lua ]; then
@@ -116,6 +115,18 @@ case "$1" in
116 115
             PROSODY_CONFIG_PRESENT="false"
117 116
         fi
118 117
 
118
+        # we always try to create the user 'jvb' and not fail configure if user exists
119
+        prosodyctl register jvb $JICOFO_AUTH_DOMAIN $JVB_SECRET || true
120
+
121
+        # Check whether prosody config has the internal muc, if not add it,
122
+        # as we are migrating configs
123
+        if ! grep -q "internal.auth.$JVB_HOSTNAME" $PROSODY_HOST_CONFIG; then
124
+            echo -e "\nComponent \"internal.auth.$JVB_HOSTNAME\" \"muc\"" >> $PROSODY_HOST_CONFIG
125
+            echo -e "    storage = \"null\"" >> $PROSODY_HOST_CONFIG
126
+            echo -e "    modules_enabled = { \"ping\"; }" >> $PROSODY_HOST_CONFIG
127
+            echo -e "    admins = { \"focusUser@auth.jitmeet.example.com\", \"jvb@auth.jitmeet.example.com\" }" >> $PROSODY_HOST_CONFIG
128
+        fi
129
+
119 130
         if [ ! -f /var/lib/prosody/$JVB_HOSTNAME.crt ]; then
120 131
             # prosodyctl takes care for the permissions
121 132
             # echo for using all default values

+ 8
- 3
doc/debian/jitsi-meet-prosody/prosody.cfg.lua-jvb.example 查看文件

@@ -35,10 +35,15 @@ Component "conference.jitmeet.example.com" "muc"
35 35
         "muc_domain_mapper";
36 36
         -- "token_verification";
37 37
     }
38
-admins = { "focusUser@auth.jitmeet.example.com" }
38
+    admins = { "focusUser@auth.jitmeet.example.com" }
39 39
 
40
-Component "jitsi-videobridge.jitmeet.example.com"
41
-    component_secret = "jitmeetSecret"
40
+-- internal muc component
41
+Component "internal.auth.jitmeet.example.com" "muc"
42
+    storage = "null"
43
+    modules_enabled = {
44
+      "ping";
45
+    }
46
+    admins = { "focusUser@auth.jitmeet.example.com", "jvb@auth.jitmeet.example.com" }
42 47
 
43 48
 VirtualHost "auth.jitmeet.example.com"
44 49
     authentication = "internal_plain"

正在加载...
取消
保存