Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

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

Дамян Минковad46df0a1ab1
diff --git a/debian/jitsi-meet-tokens.postinst b/debian/jitsi-meet-tokens.postinst
index af149fbc08..a7b3eab7e8 100644
--- a/debian/jitsi-meet-tokens.postinst
+++ b/debian/jitsi-meet-tokens.postinst
@@ -50,27 +50,15 @@ case "$1" in
if [ -f "$PROSODY_HOST_CONFIG" ] ; then
# search for the token auth, if this is not enabled this is the
# first time we install tokens package and needs a config change
- if ! egrep -q '^\s*authentication\s*=\s*"token"' "$PROSODY_HOST_CONFIG"; then
+ if ! egrep -q '^\s*authentication\s*=\s*"token" -- do not delete me' "$PROSODY_HOST_CONFIG"; then
# enable tokens in prosody host config
sed -i 's/--plugin_paths/plugin_paths/g' $PROSODY_HOST_CONFIG
- sed -i 's/authentication = "anonymous"/authentication = "token"/g' $PROSODY_HOST_CONFIG
- sed -i 's/ --allow_unencrypted_plain_auth/ allow_unencrypted_plain_auth/g' $PROSODY_HOST_CONFIG
+ sed -i 's/authentication = "anonymous" -- do not delete me/authentication = "token" -- do not delete me/g' $PROSODY_HOST_CONFIG
sed -i "s/ --app_id=\"example_app_id\"/ app_id=\"$APP_ID\"/g" $PROSODY_HOST_CONFIG
sed -i "s/ --app_secret=\"example_app_secret\"/ app_secret=\"$APP_SECRET\"/g" $PROSODY_HOST_CONFIG
sed -i 's/ --modules_enabled = { "token_verification" }/ modules_enabled = { "token_verification" }/g' $PROSODY_HOST_CONFIG
sed -i '/^\s*--\s*"token_verification"/ s/--\s*//' $PROSODY_HOST_CONFIG
- PR10_INSTALL_CHECK="$(dpkg-query -f '${Status}' -W 'prosody-0.10' 2>/dev/null | awk '{print $3}' || true)"
- PRTRUNK_INSTALL_CHECK="$(dpkg-query -f '${Status}' -W 'prosody-trunk' 2>/dev/null | awk '{print $3}' || true)"
- PR_VER_INSTALLED=$(dpkg-query -f='${Version}\n' --show prosody 2>/dev/null || true)
- if [ "$PR10_INSTALL_CHECK" = "installed" ] \
- || [ "$PR10_INSTALL_CHECK" = "unpacked" ] \
- || [ "$PRTRUNK_INSTALL_CHECK" = "installed" ] \
- || [ "$PRTRUNK_INSTALL_CHECK" = "unpacked" ] \
- || dpkg --compare-versions "$PR_VER_INSTALLED" lt "0.11" ; then
- sed -i 's/module:hook_global(/module:hook(/g' /usr/share/jitsi-meet/prosody-plugins/mod_auth_token.lua
- fi
-
if [ -x "/etc/init.d/prosody" ]; then
invoke-rc.d prosody restart || true
fi
diff --git a/doc/debian/jitsi-meet-prosody/prosody.cfg.lua-jvb.example b/doc/debian/jitsi-meet-prosody/prosody.cfg.lua-jvb.example
index 6193b04980..7f01989a33 100644
--- a/doc/debian/jitsi-meet-prosody/prosody.cfg.lua-jvb.example
+++ b/doc/debian/jitsi-meet-prosody/prosody.cfg.lua-jvb.example
@@ -36,8 +36,7 @@ unlimited_jids = {
}
VirtualHost "jitmeet.example.com"
- -- enabled = false -- Remove this line to enable this host
- authentication = "anonymous"
+ authentication = "anonymous" -- do not delete me
-- Properties below are modified by jitsi-meet-tokens package config
-- and authentication above is switched to "token"
--app_id="example_app_id"