From 4dccc90ff8792f9360e02be14102304e52840aed Mon Sep 17 00:00:00 2001 From: Luis Guzman Date: Mon, 5 Nov 2018 22:43:41 -0600 Subject: [PATCH] Enable App detection Edit nginx/apache configuration to enable app detection. --- README.md | 3 ++- quick_jibri_installer.sh | 42 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 0c5e57a..15c4023 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,7 @@ Bash installer for Jibri on *buntu 16.04 LTS based systems ## Features * Enabled Local (audio) recording using flac * Enabled Session (video) Recording using Jibri +* Enabled Jitsi Electron app detection server side. ## Requirements * Valid domain with DNS already set (preferably). @@ -11,6 +12,6 @@ Bash installer for Jibri on *buntu 16.04 LTS based systems * Dropbox developer App key & redirect url configured (if you choose to enable Dropbox upload). * Webcam - +Please note: This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY. SwITNet Ltd © - 2018, https://switnet.net/ diff --git a/quick_jibri_installer.sh b/quick_jibri_installer.sh index 88073ec..8e54916 100644 --- a/quick_jibri_installer.sh +++ b/quick_jibri_installer.sh @@ -364,6 +364,48 @@ cat << CONF_JSON > $CONF_JSON } CONF_JSON +#Tune webserver for Jitsi App control. +if [ -f /etc/apache2/sites-available/$DOMAIN.conf ]; then +WS_CONF=/etc/apache2/sites-available/$DOMAIN.conf +sed -i '$ d' $WS_CONF +cat << NG_APP >> $WS_CONF + + Alias "/external_api.js" "/usr/share/jitsi-meet/libs/external_api.min.js" + + Require all granted + + + Alias "/external_api.min.js" "/usr/share/jitsi-meet/libs/external_api.min.js" + + Require all granted + + + +NG_APP +service apache2 reload +elif [ -f /etc/nginx/sites-available/$DOMAIN.conf ]; then +WS_CONF=/etc/nginx/sites-available/$DOMAIN.conf +WS_STR=$(grep -n "Backward" $WS_CONF | cut -d ":" -f1) +WS_END=$((WS_STR + 3)) +sed -i "$WS_STR,$WS_END s|^|#|" $WS_CONF +sed -i '$ d' $WS_CONF +cat << NG_APP >> $WS_CONF + + location /external_api.min.js { + alias /usr/share/jitsi-meet/libs/external_api.min.js; + } + + location /external_api.js { + alias /usr/share/jitsi-meet/libs/external_api.min.js; + } +} +NG_APP +service nginx reload +else + echo "No app configuration done to server file, please report to: + -> https://github.com/switnet-ltd/quick-jibri-installer/issues" +fi + #Enable jibri services systemctl enable jibri systemctl enable jibri-xorg