#!/bin/bash
#
# Copyright (c) 2008-2010 by BigBlueButton Inc.
#
# This file is part of BigBlueButton - http://www.bigbluebutton.org
#
# BigBlueButton is free software; you can redistribute it and/or modify it under the
# terms of the GNU Lesser General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
# version.
#
# BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License along
# with BigBlueButton; if not, see .
#
# Author(s):
# Fred Dixon
#
# Changelog:
# 2009-10-18 FFD Inital Version
# 2009-11-05 FFD Updated for 0.62
# 2009-12-09 FFD Updated for 0.63
# 2009-12-11 FFD Added ability to swtich conference servers
# 2009-12-12 FFD Added cleaning and watching of log files
# 2010-01-05 FFD Added zipping of log files
# 2010-01-18 FFD Added resetting of environment back to using packages
# 2010-03-02 JRT Added trunk checkout options / fixed bbb-apps instructions
# 2010-04-02 FFD Updated for 0.64
# 2010-06-21 SEB Cleaned up some code / Updated for 0.70
# 2010-06-25 SEB Added ability to change the security salt
# 2010-06-30 SEB Added some extra errorchecking
# 2010-07-06 SEB Added more error checking and report messages
# 2010-09-15 FFD Updates for 0.71-dev
# 2010-10-16 FFD Updates for 0.71-beta
# 2010-11-06 FFD Added logic to ensure red5 shuts down
# 2010-12-12 FFD Fixed bug #778
# 2010-12-12 FFD Added support for Intalio VM
#set -x
BBB_VERSION="0.71a"
if [ ! -f /usr/share/red5/webapps/bigbluebutton/WEB-INF/red5-web.xml ]; then
echo "#"
echo "# BigBlueButton does not appear to be installed ... exiting"
echo "#"
exit 1
fi
#
# Figure out if we're using Asterisk or FreeSWITCH
#
if cat /usr/share/red5/webapps/bigbluebutton/WEB-INF/red5-web.xml | grep -v '