From f749bed1ddd6dd047ddafb5320f6875ef7001b3a Mon Sep 17 00:00:00 2001 From: paweldomas Date: Tue, 2 Dec 2014 20:11:54 +0100 Subject: [PATCH] Adds jicofo debian package integration. --- config.js | 2 +- debian/jitsi-meet-prosody.postinst | 19 +++++++++++++++++++ .../prosody.cfg.lua-jvb.example | 8 ++++++++ 3 files changed, 28 insertions(+), 1 deletion(-) diff --git a/config.js b/config.js index 716c7c332..f841efeee 100644 --- a/config.js +++ b/config.js @@ -13,7 +13,7 @@ var config = { useNicks: false, bosh: '//jitsi-meet.example.com/http-bind', // FIXME: use xep-0156 for that clientNode: 'http://jitsi.org/jitsimeet', // The name of client node advertised in XEP-0115 'c' stanza - focusUserJid: 'focus@auth.pawel.jitsi.net', // The real JID of focus participant + focusUserJid: 'focus@auth.jitsi-meet.example.com', // The real JID of focus participant //defaultSipNumber: '', // Default SIP number desktopSharing: 'ext', // Desktop sharing method. Can be set to 'ext', 'webrtc' or false to disable. chromeExtensionId: 'diibjkoicjeejcmhdnailmkgecihlobk', // Id of desktop streamer Chrome extension diff --git a/debian/jitsi-meet-prosody.postinst b/debian/jitsi-meet-prosody.postinst index 7cadc2897..427de235a 100644 --- a/debian/jitsi-meet-prosody.postinst +++ b/debian/jitsi-meet-prosody.postinst @@ -23,6 +23,8 @@ case "$1" in . /etc/jitsi/videobridge/config + . /etc/jitsi/jicofo/config + # loading debconf . /usr/share/debconf/confmodule @@ -41,9 +43,25 @@ case "$1" in cp /usr/share/doc/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 ln -s $PROSODY_HOST_CONFIG /etc/prosody/conf.d/$JVB_HOSTNAME.cfg.lua fi + # create 'focus@auth.domain' prosody user + # FIXME this duplicates with below + prosodyctl register $JICOFO_AUTH_USER $JICOFO_AUTH_DOMAIN $JICOFO_AUTH_PASSWORD + fi + # on UPGRADE to server side focus check if focus is configured + if [ -f $PROSODY_HOST_CONFIG ] && ! grep -q "VirtualHost \"auth.$JVB_HOSTNAME\"" $PROSODY_HOST_CONFIG; then + echo -e "\nVirtualHost \"auth.$JVB_HOSTNAME\"" >> $PROSODY_HOST_CONFIG + echo -e " authentication = \"internal_plain\"\n" >> $PROSODY_HOST_CONFIG + echo -e "admins = { \"$JICOFO_AUTH_USER@auth.$JVB_HOSTNAME\" }\n" >> $PROSODY_HOST_CONFIG + echo -e "Component \"focus.$JVB_HOSTNAME\"" >> $PROSODY_HOST_CONFIG + echo -e " component_secret=\"$JICOFO_SECRET\"\n" >> $PROSODY_HOST_CONFIG + # create 'focus@auth.domain' prosody user + # FIXME this duplicates with above + prosodyctl register $JICOFO_AUTH_USER $JICOFO_AUTH_DOMAIN $JICOFO_AUTH_PASSWORD fi if [ ! -f /var/lib/prosody/$JVB_HOSTNAME.crt ]; then @@ -60,6 +78,7 @@ case "$1" in if [ "$PROSODY_CONFIG_PRESENT" = "false" ]; then invoke-rc.d prosody restart invoke-rc.d jitsi-videobridge restart + invoke-rc.d jicofo restart 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 8b25abe59..080f94bc2 100644 --- a/doc/debian/jitsi-meet-prosody/prosody.cfg.lua-jvb.example +++ b/doc/debian/jitsi-meet-prosody/prosody.cfg.lua-jvb.example @@ -19,3 +19,11 @@ Component "conference.jitmeet.example.com" "muc" Component "jitsi-videobridge.jitmeet.example.com" component_secret = "jitmeetSecret" + +VirtualHost "auth.jitmeet.example.com" + authentication = "internal_plain" + +admins = { "focusUser@auth.jitmeet.example.com" } + +Component "focus.jitmeet.example.com" + component_secret = "focusSecret"