Skip to content

Commit

Permalink
Merge pull request bigbluebutton#4257 from ffdixon/update-bbb-conf-ce…
Browse files Browse the repository at this point in the history
…ntos-2

Minor updates for CentOS (nc does not have -z option on CentOS 7.3)
  • Loading branch information
ffdixon authored Aug 17, 2017
2 parents 6ebeeaf + 85ced4b commit 34fe7e1
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions bigbluebutton-config/bin/bbb-conf
Original file line number Diff line number Diff line change
Expand Up @@ -80,17 +80,16 @@ FREESWITCH_PID=/opt/freeswitch/run/freeswitch.pid
FREESWITCH_EVENT_SOCKET=/opt/freeswitch/conf/autoload_configs/event_socket.conf.xml

if [ -f /etc/redhat-release ]; then
echo "###"
DISTRIB_ID=centos
SERVLET_LOGS=/usr/share/$SERVLET_CONTAINER/logs
SERVLET_LOGS=/usr/share/tomcat/logs
FREESWITCH=freeswitch
FREESWITCH_INIT_D="/etc/init.d/freeswitch"
TOMCAT_USER=tomcat
TOMCAT_SERVICE=tomcat
REDIS_SERVICE=redis.service
else
. /etc/lsb-release # Get value for DISTRIB_ID
SERVLET_LOGS=/var/lib/$SERVLET_CONTAINER/logs
SERVLET_LOGS=/var/lib/tomcat7/logs
FREESWITCH=freeswitch
FREESWITCH_INIT_D="/etc/init.d/freeswitch"
TOMCAT_USER=tomcat7
Expand Down Expand Up @@ -154,6 +153,12 @@ else
IP=$(echo "$(LANG=c ifconfig | awk -v RS="" '{gsub (/\n[ ]*inet /," ")}1' | grep ^et.* | grep addr: | head -n1 | sed 's/.*addr://g' | sed 's/ .*//g')$(LANG=c ifconfig | awk -v RS="" '{gsub (/\n[ ]*inet /," ")}1' | grep ^en.* | grep addr: | head -n1 | sed 's/.*addr://g' | sed 's/ .*//g')$(LANG=c ifconfig | awk -v RS="" '{gsub (/\n[ ]*inet /," ")}1' | grep ^wl.* | grep addr: | head -n1 | sed 's/.*addr://g' | sed 's/ .*//g')$(LANG=c ifconfig | awk -v RS="" '{gsub (/\n[ ]*inet /," ")}1' | grep ^bo.* | grep addr: | head -n1 | sed 's/.*addr://g' | sed 's/ .*//g')" | head -n1)
fi

if [ -z "$IP" ]; then
if [ -f /etc/redhat-release ]; then
IP=$(hostname -I | sed 's/ .*//g')
fi
fi

#
# Calculate total memory on this server
#
Expand Down Expand Up @@ -359,8 +364,8 @@ start_bigbluebutton () {

echo -n "Waiting for FreeSWITCH to start: "

if [ ! -z $FREESWITCH_ESL_IP ]; then
while ! nc -z -w 1 $FREESWITCH_ESL_IP 8021 > /dev/null; do
if [[ ! -z $FREESWITCH_ESL_IP && $DISTRIB_ID != "centos" ]]; then
while ! nc -w 1 $FREESWITCH_ESL_IP 8021 > /dev/null; do
echo -n "."
sleep 1
done
Expand Down Expand Up @@ -1278,8 +1283,8 @@ check_state() {
#
# Check that BigBlueButton can connect to port 1935
#
if [ ! -z $NGINX_IP ]; then
if ! nc -z -w 3 $NGINX_IP 1935 > /dev/null; then
if [[ ! -z $NGINX_IP && $DISTRIB_ID != "centos" ]]; then
if ! nc -w 3 $NGINX_IP 1935 > /dev/null; then
echo "# Error: Unable to connect to port 1935 (RTMP) on $NGINX_IP"
echo
fi
Expand Down

0 comments on commit 34fe7e1

Please sign in to comment.