From f0d152ea0fe92423f39a487e97908d409f98047b Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Thu, 20 Aug 2009 19:20:36 +0200 Subject: some updates again --- murmur/murmurd | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 murmur/murmurd (limited to 'murmur/murmurd') diff --git a/murmur/murmurd b/murmur/murmurd new file mode 100644 index 0000000..630b49f --- /dev/null +++ b/murmur/murmurd @@ -0,0 +1,40 @@ +#!/bin/bash + +# general config +. /etc/rc.conf +. /etc/rc.d/functions + +PID=`pidof -o %PPID /usr/sbin/murmurd` + +case "$1" in + start) + stat_busy "Starting Murmur Server" + [ -z $PID ] && /usr/sbin/murmurd -ini /etc/murmurd.ini & > /dev/null 2>&1 + if [ $? -gt 0 ]; then + stat_fail + else + PID=`pidof -o %PPID /usr/sbin/murmurd` + echo $PID >/var/run/murmurd.pid + add_daemon murmurd + stat_done + fi + ;; + stop) + stat_busy "Stopping Murmur Server" + [ ! -z $PID ] && kill $PID & > /dev/null 2>&1 + if [ $? -gt 0 ]; then + stat_fail + else + rm_daemon murmurd + stat_done + fi + ;; + restart) + $0 stop + sleep 3 + $0 start + ;; + *) + echo "usage: $0 {start|stop|restart}" +esac +exit 0 -- cgit v1.2.3-24-g4f1b