summaryrefslogtreecommitdiffstats
path: root/murmur/murmurd
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xssn.at>2009-08-20 19:20:36 +0200
committerFlorian Pritz <bluewind@xssn.at>2009-08-20 19:20:36 +0200
commitf0d152ea0fe92423f39a487e97908d409f98047b (patch)
tree6396fb8e6a851f46f0cfc978c4720b3d2c3726b5 /murmur/murmurd
parent4955b0d9fc05950c5794c9cc37923deb00e9cfa5 (diff)
downloadaur-packages-f0d152ea0fe92423f39a487e97908d409f98047b.tar.gz
aur-packages-f0d152ea0fe92423f39a487e97908d409f98047b.tar.xz
some updates again
Diffstat (limited to 'murmur/murmurd')
-rw-r--r--murmur/murmurd40
1 files changed, 40 insertions, 0 deletions
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