From d9282f873c7bc7bde3943106b2303a1b5ec2cb9b Mon Sep 17 00:00:00 2001 From: damencho Date: Wed, 18 Dec 2019 15:46:49 +0000 Subject: [PATCH] Migrate to using mucs for jvb. --- debian/jitsi-meet-prosody.postinst | 13 ++++++++++++- .../jitsi-meet-prosody/prosody.cfg.lua-jvb.example | 11 ++++++++--- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/debian/jitsi-meet-prosody.postinst b/debian/jitsi-meet-prosody.postinst index 0bd621d9b..bb7951f97 100644 --- a/debian/jitsi-meet-prosody.postinst +++ b/debian/jitsi-meet-prosody.postinst @@ -95,7 +95,6 @@ case "$1" in mkdir -p /etc/prosody/conf.d/ cp /usr/share/jitsi-meet-prosody/prosody.cfg.lua-jvb.example $PROSODY_HOST_CONFIG sed -i "s/jitmeet.example.com/$JVB_HOSTNAME/g" $PROSODY_HOST_CONFIG - sed -i "s/jitmeetSecret/$JVB_SECRET/g" $PROSODY_HOST_CONFIG sed -i "s/focusSecret/$JICOFO_SECRET/g" $PROSODY_HOST_CONFIG sed -i "s/focusUser/$JICOFO_AUTH_USER/g" $PROSODY_HOST_CONFIG if [ ! -f /etc/prosody/conf.d/$JVB_HOSTNAME.cfg.lua ]; then @@ -116,6 +115,18 @@ case "$1" in PROSODY_CONFIG_PRESENT="false" fi + # we always try to create the user 'jvb' and not fail configure if user exists + prosodyctl register jvb $JICOFO_AUTH_DOMAIN $JVB_SECRET || true + + # Check whether prosody config has the internal muc, if not add it, + # as we are migrating configs + if ! grep -q "internal.auth.$JVB_HOSTNAME" $PROSODY_HOST_CONFIG; then + echo -e "\nComponent \"internal.auth.$JVB_HOSTNAME\" \"muc\"" >> $PROSODY_HOST_CONFIG + echo -e " storage = \"null\"" >> $PROSODY_HOST_CONFIG + echo -e " modules_enabled = { \"ping\"; }" >> $PROSODY_HOST_CONFIG + echo -e " admins = { \"focusUser@auth.jitmeet.example.com\", \"jvb@auth.jitmeet.example.com\" }" >> $PROSODY_HOST_CONFIG + fi + if [ ! -f /var/lib/prosody/$JVB_HOSTNAME.crt ]; then # prosodyctl takes care for the permissions # echo for using all default values 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 80e0317fa..e4af1c5bf 100644 --- a/doc/debian/jitsi-meet-prosody/prosody.cfg.lua-jvb.example +++ b/doc/debian/jitsi-meet-prosody/prosody.cfg.lua-jvb.example @@ -35,10 +35,15 @@ Component "conference.jitmeet.example.com" "muc" "muc_domain_mapper"; -- "token_verification"; } -admins = { "focusUser@auth.jitmeet.example.com" } + admins = { "focusUser@auth.jitmeet.example.com" } -Component "jitsi-videobridge.jitmeet.example.com" - component_secret = "jitmeetSecret" +-- internal muc component +Component "internal.auth.jitmeet.example.com" "muc" + storage = "null" + modules_enabled = { + "ping"; + } + admins = { "focusUser@auth.jitmeet.example.com", "jvb@auth.jitmeet.example.com" } VirtualHost "auth.jitmeet.example.com" authentication = "internal_plain"