From 53c8b46e57ddebfe863df1c7b81a2890be8ea24d Mon Sep 17 00:00:00 2001 From: menulis <> Date: Tue, 28 Mar 2006 10:05:46 +0000 Subject: [PATCH] - Created contrib directory for various plug-ins and/or tools to use with mbuni - Added sample mbuni-init.d script --- mbuni/contrib/mbuni-init.d | 53 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100755 mbuni/contrib/mbuni-init.d diff --git a/mbuni/contrib/mbuni-init.d b/mbuni/contrib/mbuni-init.d new file mode 100755 index 0000000..19d59bd --- /dev/null +++ b/mbuni/contrib/mbuni-init.d @@ -0,0 +1,53 @@ +#!/bin/sh + +MBUNI=/usr/local/mbuni +BINDIR=$MBUNI/bin +PIDFILES=$MBUNI/run +CONF=$MBUNI/etc/mmsc.conf + +MP=mmsproxy +MR=mmsrelay + +LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$MBUNI/lib/mbuni + +export LD_LIBRARY_PATH + +test -x $BINDIR/$MP && test -x $BINDIR/$MR || exit 0 + +case "$1" in + start) + echo -n "Starting MMSC: mmsproxy" + $BINDIR/$MP --daemonize --parachute --pid-file $PIDFILES/$MP.pid -- $CONF + sleep 1 + echo -n " mmsrelay" + $BINDIR/$MR --daemonize --parachute --pid-file $PIDFILES/$MR.pid -- $CONF + echo "." + ;; + + stop) + echo -n "Stopping MMSC: mmsrelay" + kill `cat $PIDFILES/$MR.pid` + sleep 1 + echo -n " mmsproxy" + kill `cat $PIDFILES/$MP.pid` + echo "." + ;; + + reload) + # We don't have support for this yet. + exit 1 + ;; + + restart|force-reload) + $0 stop + sleep 1 + $0 start + ;; + + *) + echo "Usage: $0 {start|stop|reload|restart|force-reload}" + exit 1 + +esac + +exit 0