Supports prosody 0.11 when configuring.
Doing few changes needed for general config and for tokens.
This commit is contained in:
parent
5a99697ae2
commit
ea54713f9a
|
@ -36,7 +36,7 @@ Description: Configuration for web serving of Jitsi Meet
|
|||
|
||||
Package: jitsi-meet-prosody
|
||||
Architecture: all
|
||||
Depends: openssl, prosody | prosody-trunk
|
||||
Depends: openssl, prosody | prosody-trunk | prosody-0.11
|
||||
Description: Prosody configuration for Jitsi Meet
|
||||
Jitsi Meet is a WebRTC JavaScript application that uses Jitsi
|
||||
Videobridge to provide high quality, scalable video conferences.
|
||||
|
@ -50,6 +50,6 @@ Description: Prosody configuration for Jitsi Meet
|
|||
|
||||
Package: jitsi-meet-tokens
|
||||
Architecture: all
|
||||
Depends: ${misc:Depends}, prosody-trunk (>= 1nightly607), libssl-dev, luarocks, jitsi-meet-prosody
|
||||
Depends: ${misc:Depends}, prosody-trunk (>= 1nightly747) | prosody-0.11 | prosody (>= 0.11.2), libssl-dev, luarocks, jitsi-meet-prosody
|
||||
Description: Prosody token authentication plugin for Jitsi Meet
|
||||
|
||||
|
|
|
@ -125,6 +125,19 @@ case "$1" in
|
|||
ln -sf /var/lib/prosody/$JVB_HOSTNAME.crt /etc/prosody/certs/$JVB_HOSTNAME.crt
|
||||
fi
|
||||
|
||||
PR11_INSTALL_CHECK="$(dpkg-query -f '${Status}' -W 'prosody-0.11' 2>/dev/null | awk '{print $3}' || true)"
|
||||
echo "PR11_INSTALL_CHECK is $PR11_INSTALL_CHECK"
|
||||
PR_VER_INSTALLED=$(dpkg-query -f='${Version}\n' --show prosody 2>/dev/null || true)
|
||||
echo "PR_VER_INSTALLED is $PR_VER_INSTALLED"
|
||||
if [ "$PR11_INSTALL_CHECK" = "installed" ] \
|
||||
|| [ "$PR11_INSTALL_CHECK" = "unpacked" ] \
|
||||
|| dpkg --compare-versions "$PR_VER_INSTALLED" gt "0.11" ; then
|
||||
sed -i 's/storage = \"null\"/storage = \"memory\"/g' $PROSODY_HOST_CONFIG
|
||||
|
||||
# trigger a restart
|
||||
PROSODY_CONFIG_PRESENT="false"
|
||||
fi
|
||||
|
||||
if [ ! -f /var/lib/prosody/$JICOFO_AUTH_DOMAIN.crt ]; then
|
||||
# prosodyctl takes care for the permissions
|
||||
# echo for using all default values
|
||||
|
|
|
@ -69,14 +69,17 @@ case "$1" in
|
|||
echo "Failed to install basexx - try installing it manually"
|
||||
fi
|
||||
|
||||
PR11_INSTALL_CHECK="$(dpkg-query -f '${Status}' -W 'prosody-0.11' 2>/dev/null | awk '{print $3}' || true)"
|
||||
PR_VER_INSTALLED=$(dpkg-query -f='${Version}\n' --show prosody 2>/dev/null || true)
|
||||
if [ "$PR11_INSTALL_CHECK" = "installed" ] \
|
||||
|| [ "$PR11_INSTALL_CHECK" = "unpacked" ] \
|
||||
|| dpkg --compare-versions "$PR_VER_INSTALLED" gt "0.11" ; then
|
||||
sed -i 's/module:hook/module:hook_global/g' /usr/share/jitsi-meet/prosody-plugins/mod_auth_token.lua
|
||||
fi
|
||||
|
||||
if [ -x "/etc/init.d/prosody" ]; then
|
||||
invoke-rc.d prosody restart
|
||||
fi
|
||||
|
||||
echo "This package requires BOSH Prosody module to be patched !"
|
||||
echo "Use the following command, after this package has been installed and"
|
||||
echo "after every prosody-trunk upgrade:"
|
||||
echo "sudo patch -N /usr/lib/prosody/modules/mod_bosh.lua /usr/share/jitsi-meet/prosody-plugins/mod_bosh.lua.patch"
|
||||
fi
|
||||
else
|
||||
echo "Prosody config not found at $PROSODY_HOST_CONFIG - unable to auto-configure token authentication"
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
--- /usr/lib/prosody/modules/mod_bosh.lua 2015-12-16 14:28:34.000000000 -0600
|
||||
+++ /usr/lib/prosody/modules/mod_bosh.lua 2015-12-22 10:45:59.818197967 -0600
|
||||
@@ -294,6 +294,9 @@
|
||||
|
||||
session.log("debug", "BOSH session created for request from %s", session.ip);
|
||||
log("info", "New BOSH session, assigned it sid '%s'", sid);
|
||||
+
|
||||
+ hosts[session.host].events.fire_event(
|
||||
+ "bosh-session", { session = session, request = request });
|
||||
|
||||
-- Send creation response
|
||||
local creating_session = true;
|
Loading…
Reference in New Issue