瀏覽代碼

fix: Fixes tokens debian package configuration. Fixes #11702.

factor2
Дамян Минков 3 年之前
父節點
當前提交
ad46df0a1a
共有 2 個檔案被更改,包括 3 行新增16 行删除
  1. 2
    14
      debian/jitsi-meet-tokens.postinst
  2. 1
    2
      doc/debian/jitsi-meet-prosody/prosody.cfg.lua-jvb.example

+ 2
- 14
debian/jitsi-meet-tokens.postinst 查看文件

@@ -50,27 +50,15 @@ case "$1" in
50 50
         if [ -f "$PROSODY_HOST_CONFIG" ] ; then
51 51
             # search for the token auth, if this is not enabled this is the
52 52
             # first time we install tokens package and needs a config change
53
-            if ! egrep -q '^\s*authentication\s*=\s*"token"' "$PROSODY_HOST_CONFIG"; then
53
+            if ! egrep -q '^\s*authentication\s*=\s*"token" -- do not delete me' "$PROSODY_HOST_CONFIG"; then
54 54
                 # enable tokens in prosody host config
55 55
                 sed -i 's/--plugin_paths/plugin_paths/g' $PROSODY_HOST_CONFIG
56
-                sed -i 's/authentication = "anonymous"/authentication = "token"/g' $PROSODY_HOST_CONFIG
57
-                sed -i 's/ --allow_unencrypted_plain_auth/ allow_unencrypted_plain_auth/g' $PROSODY_HOST_CONFIG
56
+                sed -i 's/authentication = "anonymous" -- do not delete me/authentication = "token" -- do not delete me/g' $PROSODY_HOST_CONFIG
58 57
                 sed -i "s/ --app_id=\"example_app_id\"/ app_id=\"$APP_ID\"/g" $PROSODY_HOST_CONFIG
59 58
                 sed -i "s/ --app_secret=\"example_app_secret\"/ app_secret=\"$APP_SECRET\"/g" $PROSODY_HOST_CONFIG
60 59
                 sed -i 's/ --modules_enabled = { "token_verification" }/ modules_enabled = { "token_verification" }/g' $PROSODY_HOST_CONFIG
61 60
                 sed -i '/^\s*--\s*"token_verification"/ s/--\s*//' $PROSODY_HOST_CONFIG
62 61
 
63
-                PR10_INSTALL_CHECK="$(dpkg-query -f '${Status}' -W 'prosody-0.10' 2>/dev/null | awk '{print $3}' || true)"
64
-                PRTRUNK_INSTALL_CHECK="$(dpkg-query -f '${Status}' -W 'prosody-trunk' 2>/dev/null | awk '{print $3}' || true)"
65
-                PR_VER_INSTALLED=$(dpkg-query -f='${Version}\n' --show prosody  2>/dev/null || true)
66
-                if [ "$PR10_INSTALL_CHECK" = "installed" ] \
67
-                    || [ "$PR10_INSTALL_CHECK" = "unpacked" ] \
68
-                    || [ "$PRTRUNK_INSTALL_CHECK" = "installed" ] \
69
-                    || [ "$PRTRUNK_INSTALL_CHECK" = "unpacked" ] \
70
-                    || dpkg --compare-versions "$PR_VER_INSTALLED" lt "0.11" ; then
71
-                    sed -i 's/module:hook_global(/module:hook(/g' /usr/share/jitsi-meet/prosody-plugins/mod_auth_token.lua
72
-                fi
73
-
74 62
                 if [ -x "/etc/init.d/prosody" ]; then
75 63
                     invoke-rc.d prosody restart || true
76 64
                 fi

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

@@ -36,8 +36,7 @@ unlimited_jids = {
36 36
 }
37 37
 
38 38
 VirtualHost "jitmeet.example.com"
39
-    -- enabled = false -- Remove this line to enable this host
40
-    authentication = "anonymous"
39
+    authentication = "anonymous" -- do not delete me
41 40
     -- Properties below are modified by jitsi-meet-tokens package config
42 41
     -- and authentication above is switched to "token"
43 42
     --app_id="example_app_id"

Loading…
取消
儲存