forked from switnet/quick-jibri-installer
				
			Enable App detection
Edit nginx/apache configuration to enable app detection.
This commit is contained in:
		
							parent
							
								
									7bb49bdcf8
								
							
						
					
					
						commit
						4dccc90ff8
					
				| 
						 | 
				
			
			@ -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/
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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"
 | 
			
		||||
  <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
 | 
			
		||||
systemctl enable jibri
 | 
			
		||||
systemctl enable jibri-xorg
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue