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