Added check to see of hostname resolves to the IP address

git-svn-id: http://bigbluebutton.googlecode.com/svn/trunk@3689 af16638f-c34d-0410-8cfa-b39d5352b314
This commit is contained in:
Islam El-Ashi 2010-02-08 22:24:21 +00:00
parent 86df630562
commit 451705a978

View File

@ -66,12 +66,12 @@ is_vm() {
fi
}
if [ "$(is_redhat)" ]; then
if [ $(is_redhat) ]; then
RED5_DIRECTORY="/opt/red5"
ACTIVEMQ_DIRECTORY="/opt/activemq"
TOMCAT6_LOGS="/var/log/tomcat6"
else
if [ "$(is_ubuntu)" ]; then
if [ $(is_ubuntu) ]; then
RED5_DIRECTORY="/usr/share/red5"
ACTIVEMQ_DIRECTORY="/usr/share/activemq"
TOMCAT6_LOGS="/var/lib/tomcat6/logs"
@ -115,7 +115,7 @@ usage() {
echo " --check Check current settings"
echo " --conference [konference|meetme] Switch conference module in Asterisk"
echo " --debug Check the log files for errors"
if [ "$(is_vm)" ]; then
if [ $(is_vm) ]; then
echo " --setup-samba Setup samba share for development (VM only)"
echo " --setup-dev [bbb-web|bbb-client|bbb-apps] "
echo " --reset-dev Reset environment back to using packages"
@ -261,10 +261,10 @@ done
# Version
#
if [ $VERSION ]; then
if [ "$(is_redhat)" ]; then
if [ $(is_redhat) ]; then
echo "$(yum list installed | grep bbb-conf)"
else
if [ "$(is_ubuntu)" ]; then
if [ $(is_ubuntu) ]; then
echo
dpkg -l | grep bbb
fi
@ -486,6 +486,14 @@ if [ $RESET_DEV ]; then
fi
getIPOfDomain() {
ipOfDomain=$(host $1 | cut -d\ -f 4)
if [ $ipOfDomain != "out;" ]; then
echo $ipOfDomain
fi
}
check_state() {
echo
@ -590,9 +598,15 @@ $RED5_DIRECTORY/webapps/sip/WEB-INF/bigbluebutton-sip.properties"
NGINX_IP=$(cat /etc/nginx/sites-available/bigbluebutton | sed -n '/server_name/{s/.*name[ ]*//;s/;//;p}')
if [ "$HOST_IP" != "$NGINX_IP" ]; then
echo "Host IP does not match BigBlueButton: ${HOST_IP} != ${NGINX_IP}"
NGINX_DOMAIN_IP=$(getIPOfDomain $NGINX_IP)
if [ "$HOST_IP" != "$NGINX_DOMAIN_IP" ]; then
echo "Host IP does not match BigBlueButton: ${HOST_IP} != ${NGINX_IP}"
fi
fi
x=$(host demo.bigbluebutton.org | cut -d\ -f 4)
echo
exit 0
}