ports/153923: [PATCH] update www/bigbluebutton
Alex Deiter
alex.deiter at gmail.com
Wed Jan 12 09:40:07 UTC 2011
>Number: 153923
>Category: ports
>Synopsis: [PATCH] update www/bigbluebutton
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: maintainer-update
>Submitter-Id: current-users
>Arrival-Date: Wed Jan 12 09:40:07 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator: Alex Deiter
>Release: 8.1-RELEASE
>Organization:
N/A
>Environment:
FreeBSD x4150b.tdc 8.1-RELEASE FreeBSD 8.1-RELEASE #0: Mon Jul 19 02:36:49 UTC 2010 root at mason.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64
>Description:
1. Update Makefile:
- clean tabs
- use different master sites URL for different files
- remove unused options
- add freeswitch user option
- bump portrevision
2. Update bbb-conf script:
- add freeswitch user
- check installed packages
- add start / stop options
- verify host names with getent
3. Update rc script for openoffice:
- set and use HOME env
4. Update pkg-message:
- add note about hostname resolution
- add start note
5. Clean pkg-plist
>How-To-Repeat:
cd /usr/ports/www
patch -p0 < patch-bigbluebutton.txt
cd bigbluebutton && make install
>Fix:
apply patch
Patch attached with submission follows:
diff -ur bigbluebutton.orig/Makefile bigbluebutton/Makefile
--- bigbluebutton.orig/Makefile 2011-01-09 22:10:39.000000000 +0000
+++ bigbluebutton/Makefile 2011-01-11 14:13:05.000000000 +0000
@@ -5,78 +5,76 @@
# $FreeBSD: ports/www/bigbluebutton/Makefile,v 1.1 2011/01/09 22:10:39 jpaetzel Exp $
#
-PORTNAME= bigbluebutton
-PORTVERSION= 0.71
-CATEGORIES= www java
-MASTER_SITES= http://bigbluebutton.org/downloads/%SUBDIR%/
-MASTER_SITE_SUBDIR= ${PORTVERSION} ${PORTVERSION}/packages 0.70 0.64/blank
-DISTFILES= bbb_extensions.conf bbb_sip.conf blank-slide.swf \
- blank-thumb.png nginx-bigbluebutton.conf \
- ${EXTRACT_FILES}
-EXTRACT_ONLY= ${EXTRACT_FILES}
-
-MAINTAINER= alex.deiter at gmail.com
-COMMENT= Web conferencing system for distance education
-
-BUILD_DEPENDS= ${LOCALBASE}/bin/pdf2swf:${PORTSDIR}/graphics/swftools \
- ${LOCALBASE}/bin/convert:${PORTSDIR}/graphics/ImageMagick \
- ${LOCALBASE}/etc/rc.d/activemq:${PORTSDIR}/net/activemq \
- ${LOCALBASE}/sbin/nginx:${PORTSDIR}/www/nginx \
- ${LOCALBASE}/etc/rc.d/tomcat6:${PORTSDIR}/www/tomcat6 \
- ${LOCALBASE}/etc/rc.d/red5:${PORTSDIR}/www/red5
-RUN_DEPENDS= ${BUILD_DEPENDS}
-
-EXTRACT_FILES= bigbluebutton.tar.gz freeswitch-config.tar.gz \
- red5-0.9.1.tar.gz
-
-USE_DOS2UNIX= yes
-DOS2UNIX_REGEX= .+\.(conf|jsp|properties|xml)$
-
-USE_JAVA= yes
-JAVA_VERSION= 1.5+
-JAVA_EXTRACT= yes
-USE_MYSQL= yes
-NO_BUILD= yes
-NO_WRKSUBDIR= yes
-DIST_SUBDIR= ${PORTNAME}
-USE_RC_SUBR= openoffice
-SOFFICEBIN?= ${PREFIX}/openoffice.org-3.2.1/openoffice.org3/program/soffice.bin
-RED5_HOME?= ${PREFIX}/red5
-RED5_HOME_REL= ${RED5_HOME:S,^${PREFIX}/,,}
-RED5_LOGS?= ${RED5_HOME}/log
-RED5_USER?= www
-RED5_GROUP?= ${RED5_USER}
-TOMCAT_HOME?= ${PREFIX}/apache-tomcat-6.0
-TOMCAT_HOME_REL= ${TOMCAT_HOME:S,^${PREFIX}/,,}
-TOMCAT_LOGS?= ${TOMCAT_HOME}/logs
-TOMCAT_USER?= www
-TOMCAT_GROUP?= ${TOMCAT_USER}
-WWWROOT?= ${WWWDIR:S|/${PORTNAME}$||}
-WWWROOT_REL= ${WWWROOT:S,^${PREFIX}/,,}
-
-OPTIONS= MEETME "meetme Asterisk module" off \
- KONFERENCE "konference Asterisk module" on \
- FREESWITCH "mod_conference FreeSWITCH module" off \
- OPENOFFICE "Include OpenOffice support" off
-
-PLIST_SUB+= RED5_HOME=${RED5_HOME_REL} \
- TOMCAT_HOME=${TOMCAT_HOME_REL} \
- WWWROOT=${WWWROOT_REL}
-
-SUB_LIST+= PORTNAME=${PORTNAME} \
- SOFFICEBIN=${SOFFICEBIN} \
- RED5_HOME=${RED5_HOME} \
- RED5_LOGS=${RED5_LOGS} \
- RED5_USER=${RED5_USER} \
- RED5_GROUP=${RED5_GROUP} \
- TOMCAT_HOME=${TOMCAT_HOME} \
- TOMCAT_LOGS=${TOMCAT_LOGS} \
- TOMCAT_USER=${TOMCAT_USER} \
- TOMCAT_GROUP=${TOMCAT_GROUP} \
- WWWROOT=${WWWROOT} \
- WWWDIR=${WWWDIR}
+PORTNAME= bigbluebutton
+PORTVERSION= 0.71
+PORTREVISION= 1
+CATEGORIES= www java
+MASTER_SITES= http://bigbluebutton.org/downloads/${PORTVERSION}/ \
+ http://bigbluebutton.org/downloads/0.70/:2 \
+ http://bigbluebutton.org/downloads/0.64/blank/:3
+DISTFILES= bigbluebutton.tar.gz freeswitch-config.tar.gz \
+ nginx-bigbluebutton.conf bbb_extensions.conf:2 \
+ bbb_sip.conf:2 red5-0.9.1.tar.gz:2 \
+ blank-slide.swf:3 blank-thumb.png:3
+EXTRACT_ONLY= bigbluebutton.tar.gz red5-0.9.1.tar.gz freeswitch-config.tar.gz
+
+MAINTAINER= alex.deiter at gmail.com
+COMMENT= Web conferencing system for distance education
+
+BUILD_DEPENDS= ${LOCALBASE}/bin/pdf2swf:${PORTSDIR}/graphics/swftools \
+ ${LOCALBASE}/bin/convert:${PORTSDIR}/graphics/ImageMagick \
+ ${LOCALBASE}/etc/rc.d/activemq:${PORTSDIR}/net/activemq \
+ ${LOCALBASE}/sbin/nginx:${PORTSDIR}/www/nginx \
+ ${LOCALBASE}/etc/rc.d/tomcat6:${PORTSDIR}/www/tomcat6 \
+ ${LOCALBASE}/etc/rc.d/red5:${PORTSDIR}/www/red5
+RUN_DEPENDS= ${BUILD_DEPENDS}
+
+USE_DOS2UNIX= yes
+DOS2UNIX_REGEX= .+\.(conf|jsp|properties|xml)$
+
+USE_JAVA= yes
+NO_BUILD= yes
+NO_WRKSUBDIR= yes
+DIST_SUBDIR= ${PORTNAME}
+USE_RC_SUBR= openoffice
+SOFFICEBIN?= ${PREFIX}/openoffice.org-3.2.1/openoffice.org3/program/soffice.bin
+RED5_HOME?= ${PREFIX}/red5
+RED5_LOGS?= ${RED5_HOME}/log
+RED5_USER?= www
+RED5_GROUP?= ${RED5_USER}
+TOMCAT_HOME?= ${PREFIX}/apache-tomcat-6.0
+TOMCAT_LOGS?= ${TOMCAT_HOME}/logs
+TOMCAT_USER?= www
+TOMCAT_GROUP?= ${TOMCAT_USER}
+FS_USER?= freeswitch
+FS_GROUP?= ${FS_USER}
+WWWROOT?= ${WWWDIR:S|/${PORTNAME}$||}
+
+OPTIONS= MEETME "meetme Asterisk module" off \
+ KONFERENCE "konference Asterisk module" on \
+ FREESWITCH "mod_conference FreeSWITCH module" off \
+ OPENOFFICE "Include OpenOffice support" off
+
+PLIST_SUB+= RED5_HOME=${RED5_HOME:S,^${PREFIX}/,,} \
+ TOMCAT_HOME=${TOMCAT_HOME:S,^${PREFIX}/,,} \
+ WWWROOT=${WWWROOT:S,^${PREFIX}/,,}
+
+SUB_LIST+= PORTNAME=${PORTNAME} \
+ SOFFICEBIN=${SOFFICEBIN} \
+ RED5_HOME=${RED5_HOME} \
+ RED5_LOGS=${RED5_LOGS} \
+ RED5_USER=${RED5_USER} \
+ RED5_GROUP=${RED5_GROUP} \
+ TOMCAT_HOME=${TOMCAT_HOME} \
+ TOMCAT_LOGS=${TOMCAT_LOGS} \
+ TOMCAT_USER=${TOMCAT_USER} \
+ TOMCAT_GROUP=${TOMCAT_GROUP} \
+ FREESWITCH_USER=${FS_USER} \
+ FREESWITCH_GROUP=${FS_GROUP} \
+ WWWROOT=${WWWROOT} \
+ WWWDIR=${WWWDIR}
-SUB_FILES= pkg-message openoffice nginx.conf-dist bbb-conf
+SUB_FILES= pkg-message openoffice nginx.conf-dist bbb-conf
.include <bsd.port.pre.mk>
diff -ur bigbluebutton.orig/distinfo bigbluebutton/distinfo
--- bigbluebutton.orig/distinfo 2011-01-09 22:10:39.000000000 +0000
+++ bigbluebutton/distinfo 2011-01-11 11:25:42.000000000 +0000
@@ -1,16 +1,16 @@
+SHA256 (bigbluebutton/bigbluebutton.tar.gz) = b05d8bddcf80c9105bef3b85b80f9667f63082b3a5346b4d09ddd017bfd3766e
+SIZE (bigbluebutton/bigbluebutton.tar.gz) = 54825642
+SHA256 (bigbluebutton/freeswitch-config.tar.gz) = 4d5e6691fbc760bbf3540cd1871aa74b824f280ebc7853d07a0d1dca878f7f5f
+SIZE (bigbluebutton/freeswitch-config.tar.gz) = 48955
+SHA256 (bigbluebutton/nginx-bigbluebutton.conf) = 36593e846cf1c6abcfcf5a7295e33637fea017b460230ccec14af1032806e044
+SIZE (bigbluebutton/nginx-bigbluebutton.conf) = 3012
SHA256 (bigbluebutton/bbb_extensions.conf) = 7f1afad7196210f926989fe08f2414ca570f4b97c6ad10d22236d411f3b7c6d7
SIZE (bigbluebutton/bbb_extensions.conf) = 1788
SHA256 (bigbluebutton/bbb_sip.conf) = 924925f909cb753623abf82006f8cb8acb55c3024b47544d22ca6fa01525081b
SIZE (bigbluebutton/bbb_sip.conf) = 142
+SHA256 (bigbluebutton/red5-0.9.1.tar.gz) = afd0db4f8dfcda71c5a4d68dd2488774e013e7aa68f1bb3bf901550afd3ffbed
+SIZE (bigbluebutton/red5-0.9.1.tar.gz) = 86712320
SHA256 (bigbluebutton/blank-slide.swf) = 7338ec4f98030b2da4051cd61be9f3d0e6964de10f3fd8e7e21460b401382964
SIZE (bigbluebutton/blank-slide.swf) = 223
SHA256 (bigbluebutton/blank-thumb.png) = c3c564e9023e7de608add924f752f75b28251a5b8468d2981665993fb9053cfa
SIZE (bigbluebutton/blank-thumb.png) = 983
-SHA256 (bigbluebutton/nginx-bigbluebutton.conf) = 36593e846cf1c6abcfcf5a7295e33637fea017b460230ccec14af1032806e044
-SIZE (bigbluebutton/nginx-bigbluebutton.conf) = 3012
-SHA256 (bigbluebutton/bigbluebutton.tar.gz) = b05d8bddcf80c9105bef3b85b80f9667f63082b3a5346b4d09ddd017bfd3766e
-SIZE (bigbluebutton/bigbluebutton.tar.gz) = 54825642
-SHA256 (bigbluebutton/freeswitch-config.tar.gz) = 4d5e6691fbc760bbf3540cd1871aa74b824f280ebc7853d07a0d1dca878f7f5f
-SIZE (bigbluebutton/freeswitch-config.tar.gz) = 48955
-SHA256 (bigbluebutton/red5-0.9.1.tar.gz) = afd0db4f8dfcda71c5a4d68dd2488774e013e7aa68f1bb3bf901550afd3ffbed
-SIZE (bigbluebutton/red5-0.9.1.tar.gz) = 86712320
diff -ur bigbluebutton.orig/files/bbb-conf.in bigbluebutton/files/bbb-conf.in
--- bigbluebutton.orig/files/bbb-conf.in 2011-01-09 22:10:40.000000000 +0000
+++ bigbluebutton/files/bbb-conf.in 2011-01-11 14:06:36.000000000 +0000
@@ -17,6 +17,8 @@
TOMCAT_LOGS="%%TOMCAT_LOGS%%"
TOMCAT_USER="%%TOMCAT_USER%%"
TOMCAT_GROUP="%%TOMCAT_GROUP%%"
+FREESWITCH_USER="%%FREESWITCH_USER%%"
+FREESWITCH_GROUP="%%FREESWITCH_GROUP%%"
WWWROOT="%%WWWROOT%%"
WWWDIR="%%WWWDIR%%"
ASTERISK_ETC="$PREFIX/etc/asterisk"
@@ -29,16 +31,17 @@
# BBB security salt
BBB_SALT=""
-# BBB common path
+# BBB common
BBB_SHAREDIR="%%DATADIR%%"
BBB_PRESENTATIONDIR="/var/spool/%%PORTNAME%%"
+BBB_SRV_LIST=""
BBB_INSTALL_CONF="$BBB_PRESENTATIONDIR/conf.txt"
# BBB JDBC properties
BBB_DATABASE_TYPE="mysql"
-BBB_DATABASE_HOST="localhost"
+BBB_DATABASE_HOST=""
BBB_DATABASE_NAME="%%PORTNAME%%"
-BBB_DATABASE_URL="jdbc:$BBB_DATABASE_TYPE://$BBB_DATABASE_HOST/$BBB_DATABASE_NAME"
+BBB_DATABASE_URL=""
BBB_DATABASE_DRIVER="com.mysql.jdbc.Driver"
BBB_DATABASE_USERNAME="%%PORTNAME%%"
BBB_DATABASE_PASSWORD=""
@@ -48,18 +51,18 @@
BBB_CONFERENCE_TYPE=""
# FreeSWITCH Event Socket Library (ESL)
-BBB_ESL_HOST="localhost"
+BBB_ESL_HOST=""
BBB_ESL_PORT="8021"
BBB_ESL_PASSWORD=""
# Asterisk Management Interface (AMI)
-BBB_AMI_HOST="localhost"
+BBB_AMI_HOST=""
BBB_AMI_PORT="5038"
BBB_AMI_USERNAME="bbb"
BBB_AMI_PASSWORD=""
# SIP
-BBB_SIP_HOST="localhost"
+BBB_SIP_HOST=""
BBB_SIP_PORT="5070"
BBB_SIP_USERNAME="bbbuser"
BBB_SIP_PASSWORD=""
@@ -68,8 +71,8 @@
BBB_VAR_LIST="PREFIX WWWROOT WWWDIR \
RED5_HOME RED5_LOGS RED5_USER RED5_GROUP \
TOMCAT_HOME TOMCAT_LOGS TOMCAT_USER TOMCAT_GROUP \
- ASTERISK_ETC NGINX_ETC BBB_HOSTNAME BBB_SALT \
- BBB_SHAREDIR BBB_PRESENTATIONDIR BBB_INSTALL_CONF \
+ ASTERISK_ETC NGINX_ETC BBB_HOSTNAME BBB_IP_ADDRESS BBB_SALT \
+ BBB_SHAREDIR BBB_PRESENTATIONDIR BBB_SRV_LIST BBB_INSTALL_CONF \
BBB_DATABASE_TYPE BBB_DATABASE_HOST BBB_DATABASE_NAME BBB_DATABASE_URL \
BBB_DATABASE_DRIVER BBB_DATABASE_USERNAME BBB_DATABASE_PASSWORD \
BBB_CONFERENCE_MODULE BBB_CONFERENCE_TYPE \
@@ -86,6 +89,12 @@
Install initial configuration:
$SCRIPT install -h <hostname|ip address> -c <konference|meetme|freeswitch>
+ Start all BigBlueButton services:
+ $SCRIPT start
+
+ Stop all BigBlueButton services:
+ $SCRIPT stop
+
Restart all bbb services:
$SCRIPT restart
@@ -95,21 +104,30 @@
}
bbb_random() {
- openssl rand -base64 $1 | sed -E 's|[^A-Za-z0-9]||g'
+ openssl rand -base64 48 | sed -E 's|[^A-Za-z0-9]||g' | cut -c 1-$1
}
bbb_install() {
+ CHECK_PKGS="swftools ImageMagick mysql-server activemq nginx tomcat"
+ CHECK_PKGS="$CHECK_PKGS red5"
CHECK_DIRS="RED5_HOME TOMCAT_HOME WWWROOT WWWDIR NGINX_ETC BBB_SHAREDIR"
case "$BBB_CONFERENCE_MODULE" in
konference|meetme)
+ CHECK_PKGS="$CHECK_PKGS asterisk"
CHECK_DIRS="$CHECK_DIRS ASTERISK_ETC"
;;
freeswitch)
+ CHECK_PKGS="$CHECK_PKGS freeswitch"
CHECK_DIRS="$CHECK_DIRS FREESWITCH_ETC"
;;
esac
+ for pkg in $CHECK_PKGS; do
+ echo -n "Check package $pkg: "
+ pkg_info -E ${pkg}\* || usage "$SCRIPT required $pkg package"
+ done
+
for var in $CHECK_DIRS; do
eval val=\$$var
echo -n "Check $var = '$val': "
@@ -126,6 +144,12 @@
BBB_ESL_PASSWORD="$(bbb_random 16)"
BBB_AMI_PASSWORD="$(bbb_random 16)"
BBB_SIP_PASSWORD="$(bbb_random 16)"
+ BBB_IP_ADDRESS="$(getent hosts "$BBB_HOSTNAME" | awk '{print $1}')"
+ BBB_DATABASE_HOST="$BBB_IP_ADDRESS"
+ BBB_DATABASE_URL="jdbc:$BBB_DATABASE_TYPE://$BBB_DATABASE_HOST/$BBB_DATABASE_NAME"
+ BBB_ESL_HOST="$BBB_IP_ADDRESS"
+ BBB_AMI_HOST="$BBB_IP_ADDRESS"
+ BBB_SIP_HOST="$BBB_IP_ADDRESS"
for var in $BBB_VAR_LIST; do
eval val=\$$var
@@ -136,13 +160,14 @@
mkdir -p /etc/rc.conf.d
echo "Configure activemq: rc.conf"
+ BBB_SRV_LIST="activemq"
cat >/etc/rc.conf.d/activemq <<-EOF
activemq_enable="YES"
EOF
echo -n "Configure $BBB_DATABASE_TYPE: drop/create/grant"
- (/usr/local/etc/rc.d/mysql-server status || /usr/local/etc/rc.d/mysql-server start) >/dev/null 2>&1
- mysql -h $BBB_DATABASE_HOST -u root >/dev/null <<-EOF
+ (/usr/local/etc/rc.d/mysql-server onestatus || /usr/local/etc/rc.d/mysql-server onestart) >/dev/null 2>&1
+ mysql -u root >/dev/null <<-EOF
drop database if exists $BBB_DATABASE_NAME;
create database $BBB_DATABASE_NAME;
grant all on $BBB_DATABASE_NAME.* to '$BBB_DATABASE_USERNAME'@'$BBB_DATABASE_HOST' identified by '$BBB_DATABASE_PASSWORD';
@@ -150,10 +175,13 @@
EOF
echo " rc.conf"
+ BBB_SRV_LIST="$BBB_SRV_LIST mysql-server"
cat >/etc/rc.conf.d/mysql <<-EOF
mysql_enable="YES"
EOF
+ /usr/local/etc/rc.d/mysql-server stop >/dev/null 2>&1
+
echo -n "Configure $BBB_CONFERENCE_TYPE:"
case "$BBB_CONFERENCE_MODULE" in
konference|meetme)
@@ -212,6 +240,7 @@
noload => app_konference.so
EOF
+ BBB_SRV_LIST="$BBB_SRV_LIST zaptel"
cat >/etc/rc.conf.d/zaptel <<-EOF
zaptel_enable="YES"
zaptel_kmod_load="zaptel.ko ztdummy.ko"
@@ -231,17 +260,50 @@
EOF
echo " rc.conf"
+ BBB_SRV_LIST="$BBB_SRV_LIST asterisk"
cat >/etc/rc.conf.d/asterisk <<-EOF
asterisk_enable="YES"
EOF
;;
freeswitch)
- echo "Not implemented yet"
- exit 1
+ cd $FREESWITCH_ETC
+ echo -n " backup"
+ mv conf conf$BACKUP
+
+ echo -n " extract"
+ (cd $BBB_SHAREDIR/freeswitch && tar cf - conf) | tar xf -
+ chown -R $FREESWITCH_USER:$FREESWITCH_GROUP conf
+ cd conf
+
+ echo -n " event_socket.conf.xml"
+ $INSTALL_CMD -m 0600 -o $FREESWITCH_USER -g $FREESWITCH_GROUP \
+ autoload_configs/event_socket.conf.xml-dist \
+ autoload_configs/event_socket.conf.xml
+ sed -i '' $BBB_REPLACE autoload_configs/event_socket.conf.xml
+
+ echo -n " acl.conf.xml"
+ $INSTALL_CMD -m 0600 -o $FREESWITCH_USER -g $FREESWITCH_GROUP \
+ autoload_configs/acl.conf.xml-dist \
+ autoload_configs/acl.conf.xml
+ sed -i '' $BBB_REPLACE autoload_configs/acl.conf.xml
+
+ echo -n " $BBB_SIP_USERNAME.xml"
+ $INSTALL_CMD -m 0600 -o $FREESWITCH_USER -g $FREESWITCH_GROUP \
+ directory/default/bbbuser.xml-dist \
+ directory/default/$BBB_SIP_USERNAME.xml
+ sed -i '' $BBB_REPLACE directory/default/$BBB_SIP_USERNAME.xml
+
+ echo " rc.conf"
+ BBB_SRV_LIST="$BBB_SRV_LIST freeswitch"
+ cat >/etc/rc.conf.d/freeswitch <<-EOF
+ freeswitch_enable="YES"
+ freeswitch_flags="-ncwait -waste -nonat"
+ EOF
;;
esac
echo "Configure openoffice: rc.conf"
+ BBB_SRV_LIST="$BBB_SRV_LIST openoffice"
cat >/etc/rc.conf.d/openoffice <<-EOF
openoffice_enable="YES"
EOF
@@ -269,35 +331,10 @@
WEB-INF/classes/log4j.properties
echo " rc.conf"
+ BBB_SRV_LIST="$BBB_SRV_LIST tomcat6"
cat >/etc/rc.conf.d/tomcat60 <<-EOF
tomcat60_enable="YES"
- tomcat60_stop_timeout="60"
- EOF
-
- echo -n "Configure nginx:"
- cd $NGINX_ETC
- mkdir -p sites-available sites-enabled
-
- echo -n " nginx.conf"
- $INSTALL_CMD $BBB_SHAREDIR/nginx/nginx.conf-dist nginx.conf
-
- echo -n " bigbluebutton.conf"
- $INSTALL_CMD $BBB_SHAREDIR/nginx/nginx-bigbluebutton.conf-dist \
- sites-available/bigbluebutton.conf
- sed -i '' $BBB_REPLACE nginx.conf sites-available/bigbluebutton.conf
- cd sites-enabled
- rm -f bigbluebutton.conf
- ln -s ../sites-available/bigbluebutton.conf \
- bigbluebutton.conf
- cd $WWWDIR/client/conf
-
- echo -n " config.xml"
- $INSTALL_CMD config.xml-dist config.xml
- sed -i '' $BBB_REPLACE config.xml
-
- echo " rc.conf"
- cat >/etc/rc.conf.d/nginx <<-EOF
- nginx_enable="YES"
+ tomcat60_stop_timeout="30"
EOF
echo -n "Configure red5:"
@@ -327,16 +364,44 @@
sed -i '' $BBB_REPLACE bigbluebutton-sip.properties
echo " rc.conf"
+ BBB_SRV_LIST="$BBB_SRV_LIST red5"
RED5_RMI_PORT=$(awk -F= '/^jmx.rmi.port.registry/{print $2}' $RED5_HOME/conf/red5.properties)
RED5_RMI_USER=$(awk '/^[^#].+readwrite$/{print $1}' $RED5_HOME/conf/access.properties | head -1)
RED5_RMI_PASSWD=$(awk '/^'$RED5_RMI_USER'[\ \t]+/{print $2}' $RED5_HOME/conf/password.properties)
cat >/etc/rc.conf.d/red5 <<-EOF
red5_enable="YES"
- red5_stop_timeout="60"
+ red5_stop_timeout="30"
red5_stop_class_opts="$RED5_RMI_PORT $RED5_RMI_USER $RED5_RMI_PASSWD"
EOF
+ echo -n "Configure nginx:"
+ cd $NGINX_ETC
+ mkdir -p sites-available sites-enabled
+
+ echo -n " nginx.conf"
+ $INSTALL_CMD $BBB_SHAREDIR/nginx/nginx.conf-dist nginx.conf
+
+ echo -n " bigbluebutton.conf"
+ $INSTALL_CMD $BBB_SHAREDIR/nginx/nginx-bigbluebutton.conf-dist \
+ sites-available/bigbluebutton.conf
+ sed -i '' $BBB_REPLACE nginx.conf sites-available/bigbluebutton.conf
+ cd sites-enabled
+ rm -f bigbluebutton.conf
+ ln -s ../sites-available/bigbluebutton.conf \
+ bigbluebutton.conf
+ cd $WWWDIR/client/conf
+
+ echo -n " config.xml"
+ $INSTALL_CMD config.xml-dist config.xml
+ sed -i '' $BBB_REPLACE config.xml
+
+ echo " rc.conf"
+ BBB_SRV_LIST="$BBB_SRV_LIST nginx"
+ cat >/etc/rc.conf.d/nginx <<-EOF
+ nginx_enable="YES"
+ EOF
+
echo -n "Save config:"
$INSTALL_CMD -m 0600 /dev/null $BBB_INSTALL_CONF
cat >$BBB_INSTALL_CONF <<-EOF
@@ -348,35 +413,31 @@
for var in $BBB_VAR_LIST; do
eval val=\$$var
cat >>$BBB_INSTALL_CONF <<-EOF
- $var=$val
+ $var="$val"
EOF
done
echo " $BBB_INSTALL_CONF"
}
-bbb_restart() {
- . $BBB_INSTALL_CONF
+bbb_start() {
+ for i in $BBB_SRV_LIST; do
+ $PREFIX/etc/rc.d/$i start || true
+ done
+}
- $PREFIX/etc/rc.d/activemq restart
- $PREFIX/etc/rc.d/mysql-server restart
- case "$BBB_CONFERENCE_MODULE" in
- meetme)
- if ! kldstat -q -m ztdummy; then
- $PREFIX/etc/rc.d/zaptel start >/dev/null 2>&1
- fi
- $PREFIX/etc/rc.d/asterisk restart
- ;;
- konference)
- $PREFIX/etc/rc.d/asterisk restart
- ;;
- freeswitch)
- $PREFIX/etc/rc.d/freeswitch restart
- ;;
- esac
- $PREFIX/etc/rc.d/openoffice restart
- $PREFIX/etc/rc.d/tomcat6 restart
- $PREFIX/etc/rc.d/red5 restart
- $PREFIX/etc/rc.d/nginx restart
+bbb_stop() {
+ for i in $BBB_SRV_LIST; do
+ REVERSE_SRV_LIST="$i $REVERSE_SRV_LIST"
+ done
+
+ for i in $REVERSE_SRV_LIST; do
+ $PREFIX/etc/rc.d/$i stop || true
+ done
+}
+
+bbb_restart() {
+ bbb_stop
+ bbb_start
}
if [ "`/usr/bin/id -u`" != "0" ]; then
@@ -384,7 +445,7 @@
fi
if [ $# -eq 0 ]; then
- bbb_usage "$SCRIPT <install|restart> [options]"
+ bbb_usage "$SCRIPT <install|start|stop|restart> [options]"
fi
BBB_ACTION="$1"
@@ -409,8 +470,8 @@
if [ -z "$BBB_HOSTNAME" ]; then
bbb_usage "Error: 'install' action required '-h' option"
else
- if ! host "$BBB_HOSTNAME" >/dev/null 2>&1; then
- bbb_usage "Error: hostname '$BBB_HOSTNAME' not found by host command"
+ if ! getent hosts "$BBB_HOSTNAME" >/dev/null 2>&1; then
+ bbb_usage "Error: hostname '$BBB_HOSTNAME' not found by getent command"
fi
fi
@@ -441,11 +502,18 @@
fi
bbb_install
;;
-restart)
- if [ -n "$BBB_HOSTNAME" ]; then
- bbb_usage "Error: 'restart' action do not allow any options"
+start|stop|restart)
+ if [ -n "$BBB_HOSTNAME" -o -n "$BBB_CONFERENCE_MODULE" ]; then
+ bbb_usage "Error: '$BBB_ACTION' action do not allow any options"
fi
- bbb_restart
+
+ if [ -s "$BBB_INSTALL_CONF" ]; then
+ . $BBB_INSTALL_CONF
+ else
+ bbb_usage "Error: '$BBB_ACTION' action allow only after install"
+ fi
+
+ eval bbb_$BBB_ACTION
;;
*)
bbb_usage "Error: '$BBB_ACTION' is not valid action"
diff -ur bigbluebutton.orig/files/openoffice.in bigbluebutton/files/openoffice.in
--- bigbluebutton.orig/files/openoffice.in 2011-01-09 22:10:41.000000000 +0000
+++ bigbluebutton/files/openoffice.in 2011-01-11 11:30:59.000000000 +0000
@@ -17,6 +17,8 @@
# Set it to required username.
# openoffice_group (group): Set to www by default.
# Set it to required group.
+# openoffice_home (string): Set to /var/spool/%%PORTNAME%% by default.
+# Set it to required dir.
# openoffice_bin (string): Set by default - see below.
# Set it to soffice.bin path.
# openoffice_args (string): Set by default - see below.
@@ -32,6 +34,7 @@
: ${openoffice_enable:=NO}
: ${openoffice_user:="www"}
: ${openoffice_group:="www"}
+: ${openoffice_home:="/var/spool/%%PORTNAME%%"}
: ${openoffice_bin:="%%SOFFICEBIN%%"}
: ${openoffice_args:="-accept=socket,host=localhost,port=8100;urp -headless -nofirststartwizard"}
@@ -42,7 +45,8 @@
openoffice_start() {
echo "Starting ${name}."
- /usr/sbin/daemon -f -p ${pidfile} -u ${openoffice_user} \
+ env HOME=${openoffice_home} /usr/sbin/daemon \
+ -f -p ${pidfile} -u ${openoffice_user} \
${openoffice_bin} ${openoffice_args}
}
diff -ur bigbluebutton.orig/files/pkg-message.in bigbluebutton/files/pkg-message.in
--- bigbluebutton.orig/files/pkg-message.in 2011-01-09 22:10:41.000000000 +0000
+++ bigbluebutton/files/pkg-message.in 2011-01-11 11:31:26.000000000 +0000
@@ -1,15 +1,19 @@
-==========================================================================
+===============================================================================
BigBlueButon is now installed. If you install it for the first time,
you may need to perform the following steps:
-1. Configure your BigBlueButon with command:
+1. Check /etc/hosts or DNS for your BigBlueButon server hostname resolution:
+
+% getent hosts bbb-hostname
+
+2. Configure your BigBlueButon server with command:
# bbb-config install -h <hostname|ip address> -c <konference|meetme|freeswitch>
2. Start your BigBlueButon with command:
-# bbb-config restart
+# bbb-config start
3. Open http://<hostname|ip address> in your web browser.
@@ -27,4 +31,4 @@
http://code.google.com/p/bigbluebutton/wiki/ConfigurationFiles
http://code.google.com/p/bigbluebutton/wiki/FAQ
-==========================================================================
+===============================================================================
diff -ur bigbluebutton.orig/pkg-plist bigbluebutton/pkg-plist
--- bigbluebutton.orig/pkg-plist 2011-01-09 22:10:39.000000000 +0000
+++ bigbluebutton/pkg-plist 2011-01-11 11:24:30.000000000 +0000
@@ -1530,7 +1530,6 @@
@dirrmtry %%WWWDIR%%/client/org
@dirrmtry %%WWWDIR%%/client/swfobject
@dirrmtry %%WWWDIR%%/client
- at dirrmtry %%WWWDIR%%
@dirrmtry %%RED5_HOME%%/webapps/deskshare/META-INF
@dirrmtry %%RED5_HOME%%/webapps/deskshare/WEB-INF/lib
@dirrmtry %%RED5_HOME%%/webapps/deskshare/WEB-INF/classes/org/bigbluebutton/deskshare/server/socket
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list