Revision: 3169
Author: [email protected]
Date: Fri Mar 19 06:36:02 2010
Log: modified some dependencies to be more accurate and some scrips for
file converting functionality to work out-of-the-box
http://code.google.com/p/openmeetings/source/detail?r=3169
Added:
/trunk/debian_package/etc/init.d/ooomeetings
/trunk/debian_package/usr/share/red5-openmeetings/ooomeetings-daemon.sh
Modified:
/trunk/debian_package/DEBIAN/control
/trunk/debian_package/DEBIAN/md5sums
/trunk/debian_package/DEBIAN/postinst
/trunk/debian_package/DEBIAN/templates
/trunk/debian_package/etc/init.d/red5-openmeetings
=======================================
--- /dev/null
+++ /trunk/debian_package/etc/init.d/ooomeetings Fri Mar 19 06:36:02 2010
@@ -0,0 +1,185 @@
+#!/bin/sh
+
+# For RedHat and similar:
+# chkconfig: 2345 85 85
+# description: open office server daemon
+# processname: soffice
+# last modified:16.03.2010 Rodion Volkov
+
+### BEGIN INIT INFO
+# Provides : openoffice
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: Start/stop openoffice server daemon for Openmeetings
+### END INIT INFO
+
+NAME=ooomeetings
+
+# default configuration
+RUN_HOME=/usr/share/red5-openmeetings
+RUN_USER=root
+RUN_GROUP=root
+
+
+# Source function library
+
+# red hat specific
+# [ -r /etc/sysconfig/$NAME ] && . /etc/sysconfig/$NAME
+[ -r /etc/default/$NAME ] && . /etc/default/$NAME
+
+# local variables
+DAEMON=$RUN_HOME/$NAME-daemon.sh
+PIDFILE=/var/run/$NAME.pid
+LOGFILE=/var/log/$NAME.log
+
+[ -z "$SOFFICE_PORT" ] && SOFFICE_PORT=8100
+[ -z "$SOFFICE_ARGS" ] && SOFFICE_ARGS="-nologo -headless
-nofirststartwizard
-accept=socket,host=localhost,port=$SOFFICE_PORT;urp;StarOffice.ServiceManager"
+
+# check OpenOffice
+[ -z "$SOFFICE" ] && SOFFICE=`which soffice`
+if [ ! -x "$SOFFICE" ]; then
+ echo $"Open Office Org not found. Check Open Office Org installed"
+ exit 1
+fi
+
+# export variables for daemon script
+export PIDFILE
+export LOGFILE
+export SOFFICE
+export SOFFICE_ARGS
+##
+
+EXIT_CODE=0
+
+
+check_files() {
+ if [ ! -w $PIDFILE ]; then
+ touch "$PIDFILE"
+ chown "$RUN_USER" "$PIDFILE"
+ fi
+
+ if [ ! -w $LOGFILE ]; then
+ touch "$LOGFILE"
+ chown "$RUN_USER" "$LOGFILE"
+ fi
+}
+
+do_start() {
+ echo -n $"Starting $NAME: "
+ pid=`cat "$PIDFILE" 2>/dev/null`
+ if [ -f "$PIDFILE" -a -n "$pid" ]; then
+ if kill -0 $pid 2>/dev/null ; then
+ echo $"already running"
+ return 0
+ fi
+ fi
+
+ check_files
+
+ su -c "$DAEMON" "$RUN_USER"
+ EXIT_CODE=$?
+
+ if [ $EXIT_CODE -eq 0 ] ; then
+ touch "/var/lock/subsys/$NAME" 2>/dev/null
+ echo " SUCCESS"
+ fi
+
+ return $EXIT_CODE
+}
+
+do_stop() {
+ echo -n "Shutting down $NAME: "
+
+ pid=`cat "$PIDFILE" 2>/dev/null` || true
+ if [ ! -f $PIDFILE -o -z "$pid" ]; then
+ echo $"not running (there is no $PIDFILE)"
+ return 0
+ fi
+
+ if ! kill -TERM $pid 2>/dev/null; then
+ # TERM failed. wait and kill
+
+ c=0
+ while kill -0 $pid 2>/dev/null
+ do
+ cnt=`expr $cnt + 1`
+ if [ $cnt -gt 30 ]; then
+ break
+ fi
+ sleep 1
+ echo -n "."
+ done
+
+ # kill daemon
+ if ! kill -KILL $pid 2>/dev/null ; then
+ # not killed? check reason
+ if kill -0 $pid 2>/dev/null ; then
+ echo "FAILED: $pid is not $DAEMON or not running as $RUN_USER"
+ else
+ echo "FAILED: $DAEMON died, process $pid not running or access
denied"
+ fi
+ fi
+ fi
+
+ # delete pidfile
+ rm -r "$PIDFILE" 2>/dev/null
+ # delete lockfile
+ rm -r "/var/lock/subsys/$NAME" 2>/dev/nul
+
+ echo $"SUCCESS"
+ return 0
+}
+
+do_status() {
+ pid=`cat "$PIDFILE" 2>/dev/null`
+ if [ ! -f $PIDFILE -o -z "$pid" ]; then
+ echo "$NAME is stopped"
+ return 3
+ fi
+
+ if kill -0 $pid 2>/dev/null ; then
+ echo "$NAME is running"
+ return 0
+ fi
+
+ if [ -f $PIDFILE ]; then
+ echo "$NAME is dead but pidfile exists"
+ return 1
+ fi
+
+ if [-f /var/lock/subsys/$NAME ]; then
+ echo "$NAME is dead but subsys locked"
+ return 2
+ fi
+
+ echo "$NAME is stopped"
+ return 3
+}
+
+case "$1" in
+ start)
+ do_start
+ ;;
+
+ stop)
+ do_stop
+ ;;
+
+ restart)
+ do_stop
+ do_start
+ ;;
+
+ status)
+ do_status
+ EXIT_CODE=$?
+ ;;
+
+ *)
+ echo "Usage: <servicename> {start|stop|status|restart}"
+ exit 1
+ ;;
+esac
+
+exit $EXIT_CODE
+
=======================================
--- /dev/null
+++ /trunk/debian_package/usr/share/red5-openmeetings/ooomeetings-daemon.sh
Fri Mar 19 06:36:02 2010
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+# last modified:22.04.2009 CTpaHHoe
+
+[ -z "$PIDFILE" ] && exit 201
+[ -z "$LOGFILE" ] && exit 202
+[ -z "$SOFFICE" ] && exit 203
+[ -z "$SOFFICE_ARGS" ] && exit 204
+
+touch "$PIDFILE" || exit 205
+
+# echo $SOFFICE $SOFFICE_ARGS
+$SOFFICE $SOFFICE_ARGS >>"$LOGFILE" 2>&1 &
+
+RETVAL=$?
+echo $! 2>/dev/null 1>"$PIDFILE"
+
+exit $RETVAL
+
=======================================
--- /trunk/debian_package/DEBIAN/control Thu Feb 25 01:54:00 2010
+++ /trunk/debian_package/DEBIAN/control Fri Mar 19 06:36:02 2010
@@ -3,7 +3,9 @@
Architecture: all
Maintainer: Rodion Volkov <[email protected]>
Installed-Size: 102708
-Depends: sun-java6-jdk, debconf
+Depends: sun-java6-jdk, debconf, mysql-client
+Suggests: openoffice.org, imagemagick, swftools, ghostscript
+Recommends: mysql-server
Conflicts: red5-server, tomcat6, tomcat5
Section: utils
Priority: optional
=======================================
--- /trunk/debian_package/DEBIAN/md5sums Thu Feb 25 01:54:00 2010
+++ /trunk/debian_package/DEBIAN/md5sums Fri Mar 19 06:36:02 2010
@@ -1,3 +1,6 @@
+c889fe99443180789c011cfe9c1fc880 etc/init.d/red5-openmeetings
+30b55a162e84288649317131f854de4a etc/init.d/ooomeetings
+d8a42c074a62143aa88debb2b4f2e77b etc/default/red5-openmeetings
b65e52d451e9d6cd485801a5aa3cb3ff usr/share/red5-openmeetings/postinst.sh
268bb0c6a714dd988643274b80f992c7
usr/share/red5-openmeetings/lib/jruby-engine-1.1.6.jar
0864209dfc6957b4c7ae36e27e2fb9c1
usr/share/red5-openmeetings/lib/bcprov-jdk16-139.jar
@@ -600,6 +603,7 @@
fedbbe05fcb8069c34b202d63708cc60 usr/share/red5-openmeetings/build.xml
12b39cdd3da0ea5a11d188f7f26bba16 usr/share/red5-openmeetings/red5.jar
df055c05cb0535a2649ab64aa66b4ed4
usr/share/red5-openmeetings/red5-debug.bat
+af1c5afe9dd33f992f85aa3e79081e2c
usr/share/red5-openmeetings/ooomeetings-daemon.sh
ebbcfcfbc5689c74e993a0c330570808
usr/share/red5-openmeetings/build.properties
70e19f216f47f8e59a69dc2c3476a593
usr/share/red5-openmeetings/conf/red5-common.xml
542e8f3930d4effeec2ea6b6cba021b7
usr/share/red5-openmeetings/conf/red5.properties
=======================================
--- /trunk/debian_package/DEBIAN/postinst Fri Mar 12 09:06:32 2010
+++ /trunk/debian_package/DEBIAN/postinst Fri Mar 19 06:36:02 2010
@@ -51,8 +51,10 @@
fi
sed -i 's|RUN_USER=.*$|RUN_USER='$RUN_USER'|'
/etc/default/red5-openmeetings
+sed -i 's|RUN_USER=.*$|RUN_USER='$RUN_USER'|' /etc/init.d/ooomeetings
sed -i 's|RUN_GROUP=.*$|RUN_GROUP='$RUN_GROUP'|'
/etc/default/red5-openmeetings
+sed -i 's|RUN_GROUP=.*$|RUN_GROUP='$RUN_GROUP'|' /etc/init.d/ooomeetings
chown -R $RUN_USER:$RUN_GROUP /usr/share/red5-openmeetings
sed -i -r 's|jdbc:mysql:\/\/[^\/]*?\/|jdbc:mysql:\/\/'$MYSQL_SERVER'\/|'
/usr/share/red5-openmeetings/webapps/openmeetings/conf/hibernate.cfg.xml
@@ -65,7 +67,14 @@
touch /usr/share/red5-openmeetings/postinst.done
-echo "Successfully configured Openmeetings for first start. Please start
with \"/etc/init.d/red5-openmeetings start\" command and go to
http://<host_ip>:5080/openmeetings/install to complete the installation
process"
+update-rc.d ooomeetings defaults
+
+update-rc.d red5-openmeetings defaults
+
+echo "Successfully configured Openmeetings for first start. Please go to
http://<host_ip>:5080/openmeetings/install to complete the installation
process"
+
+/etc/init.d/red5-openmeetings start
+/etc/init.d/ooomeetings start
else
=======================================
--- /trunk/debian_package/DEBIAN/templates Thu Feb 25 01:54:00 2010
+++ /trunk/debian_package/DEBIAN/templates Fri Mar 19 06:36:02 2010
@@ -12,7 +12,7 @@
Template: red5-openmeetings/mysqlpwd
Type: password
-Default:
+Default:
Description: MySql user's password
Please enter the mysql user's password to be used with OpenMeetings.
=======================================
--- /trunk/debian_package/etc/init.d/red5-openmeetings Thu Feb 25 01:54:00
2010
+++ /trunk/debian_package/etc/init.d/red5-openmeetings Fri Mar 19 06:36:02
2010
@@ -6,6 +6,13 @@
# processname: red5-openmeetings
# last modified:22.04.2009 CTpaHHoe
+### BEGIN INIT INFO
+# Provides: red5-openmeetings
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: Start/stop OpenMeetings java server daemon
+### END INIT INFO
+
NAME=red5-openmeetings
# default configuration
--
You received this message because you are subscribed to the Google Groups
"OpenMeetings developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/openmeetings-dev?hl=en.