reformatting of commands to enable/disable webRTC support

This commit is contained in:
Fred Dixon 2014-03-16 19:55:16 +00:00
parent ae5316116e
commit 44e2255b59

View File

@ -154,6 +154,8 @@ usage() {
echo " --version Display BigBlueButton version (packages)"
echo " --setip <host> Set IP/hostname for BigBlueButton"
echo " --setsecret <secret> Change the shared secret in bigbluebutton.properties"
echo " --enablewebrtc Enables webrtc feature in the server"
echo " --disablewebrtc Disables webrtc feature in the server"
echo
echo "Monitoring:"
echo " --check Check configuration files and processes for problems"
@ -338,8 +340,6 @@ disable_webrtc(){
bbb-conf --clean
}
if [ $# -eq 0 ]; then
usage
exit 1
@ -421,6 +421,18 @@ while [ $# -gt 0 ]; do
continue
fi
if [ "$1" = "--enablewebrtc" -o "$1" = "-enablewebrtc" ]; then
need_root
enable_webrtc
exit 0
fi
if [ "$1" = "--disablewebrtc" -o "$1" = "-disablewebrtc" ]; then
need_root
disable_webrtc
exit 0
fi
#
# all other parameters requires at least 1 argument
#
@ -500,18 +512,6 @@ while [ $# -gt 0 ]; do
continue
fi
if [ "$1" = "--enablewebrtc" -o "$1" = "-enablewebrtc" ]; then
need_root
enable_webrtc
exit 0
fi
if [ "$1" = "--disablewebrtc" -o "$1" = "-disablewebrtc" ]; then
need_root
disable_webrtc
exit 0
fi
usage
exit 1
done
@ -543,6 +543,7 @@ fi
# Setup samba
#
echo "##$CLEAN##"
if [ $SAMBA ]; then
check_root
@ -1166,10 +1167,14 @@ if [ $CHECK ]; then
echo " Port test (tunnel): $PORT_IP"
RED5_IP=$(cat /var/www/bigbluebutton/client/conf/config.xml | sed -n '/uri.*video/{s/.*rtmp:\/\///;s/\/.*//;p}')
WEBRTC_ENABLED_CLIENT=$(grep -i webrtc /var/www/bigbluebutton/client/conf/config.xml | cut -d '"' -f2)
echo " Red5: $RED5_IP"
echo " webrtc enabled: $WEBRTC_ENABLED_CLIENT"
WEBRTC_ENABLED=$(grep -i webrtc /var/www/bigbluebutton/client/conf/config.xml | cut -d '"' -f2)
echo " webrtc: $WEBRTC_ENABLED"
WEBRTC_SOCKET=$(sudo cat /opt/freeswitch/conf/sip_profiles/external.xml | sed -n '/ws-binding/{s/.*value="://;s/".*//;p}')
echo
echo "/opt/freeswitch/conf/sip_profiles/external.xml (FreeSWITCH)"
echo " websocket port: $WEBRTC_SOCKET"
echo
echo "/etc/nginx/sites-available/bigbluebutton (nginx)"
@ -1320,12 +1325,11 @@ if [ $DEBUG ]; then
fi
rm -rf /tmp/t
sudo grep -i exception /var/log/syslog > /tmp/t
if [ -s /tmp/t ]; then
sudo grep -i exception /var/log/syslog > /tmp/t
if [ -s /tmp/t ]; then
echo " -- Errors found in /var/log/syslog -- "
cat /tmp/t
echo
fi
fi
rm -rf /tmp/t