#!/bin/bash # # mcu: Starts the openmcu MCU server # # Version: @(#) /etc/init.d/openmcu 1.0 # # Author: David Ethell # # Modified by: Marion Bates April 2, 2004 # # chkconfig: 2345 99 01 # description: openmcu is an h323 compatible multi-point conference server. # # processname: openmcu # Source function library. . /etc/rc.d/init.d/functions openmcu=/usr/local/bin/openmcu prog=openmcu lock=/var/lock/subsys/openmcu OPTIONS="-n -v -u \"Our VoIP Server\" --defaultroom RoomName --disable-menu" RETVAL=0 # Basic function defintions start() { echo -n $"Starting $prog: " $openmcu $OPTIONS > /dev/null & RETVAL=$? echo [ $RETVAL = 0 ] && touch $lock return $RETVAL } stop() { echo -n $"Stopping $prog: " killproc $openmcu RETVAL=$? echo [ $RETVAL = 0 ] && rm -f $lock } reload() { echo -n $"Reloading $prog: " killproc $openmcu -HUP RETVAL=$? echo } # See how we were called. case "$1" in start) start ;; stop) stop ;; status) status $openmcu RETVAL=$? ;; restart) stop # Ugly hack to wait for any connections to time out so that # port 1720 will open up. Really should have some script # that checks netstat for usage on port 1720 until it clears up. sleep 30 start ;; *) echo $"Usage: $prog {start|stop|restart|status}" exit 1 esac exit $RETVAL