From 44e2255b59bd5867c0c1c3e551c91d93f4e8b45c Mon Sep 17 00:00:00 2001 From: Fred Dixon Date: Sun, 16 Mar 2014 19:55:16 +0000 Subject: [PATCH] reformatting of commands to enable/disable webRTC support --- bigbluebutton-config/bin/bbb-conf | 42 +++++++++++++++++-------------- 1 file changed, 23 insertions(+), 19 deletions(-) diff --git a/bigbluebutton-config/bin/bbb-conf b/bigbluebutton-config/bin/bbb-conf index 6e06a4f7f1..a215eae445 100755 --- a/bigbluebutton-config/bin/bbb-conf +++ b/bigbluebutton-config/bin/bbb-conf @@ -154,6 +154,8 @@ usage() { echo " --version Display BigBlueButton version (packages)" echo " --setip Set IP/hostname for BigBlueButton" echo " --setsecret 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