Enable App detection

Edit nginx/apache configuration to enable app detection.
This commit is contained in:
Luis Guzmán 2018-11-05 22:43:41 -06:00
parent 7bb49bdcf8
commit 4dccc90ff8
No known key found for this signature in database
GPG Key ID: BE0F0FDD8926E0C5
2 changed files with 44 additions and 1 deletions

View File

@ -4,6 +4,7 @@ Bash installer for Jibri on *buntu 16.04 LTS based systems
## Features ## Features
* Enabled Local (audio) recording using flac * Enabled Local (audio) recording using flac
* Enabled Session (video) Recording using Jibri * Enabled Session (video) Recording using Jibri
* Enabled Jitsi Electron app detection server side.
## Requirements ## Requirements
* Valid domain with DNS already set (preferably). * 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). * Dropbox developer App key & redirect url configured (if you choose to enable Dropbox upload).
* Webcam * 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/ SwITNet Ltd © - 2018, https://switnet.net/

View File

@ -364,6 +364,48 @@ cat << CONF_JSON > $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"
<Location /config.js>
Require all granted
</Location>
Alias "/external_api.min.js" "/usr/share/jitsi-meet/libs/external_api.min.js"
<Location /config.js>
Require all granted
</Location>
</VirtualHost>
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 #Enable jibri services
systemctl enable jibri systemctl enable jibri
systemctl enable jibri-xorg systemctl enable jibri-xorg