summaryrefslogtreecommitdiff
path: root/network/murmur/rc.murmur
diff options
context:
space:
mode:
authoradev <adev@linuxmail.org>2010-05-11 22:54:57 +0200
committerDavid Somero <xgizzmo@slackbuilds.org>2010-05-11 22:54:57 +0200
commitedc1cb3d4676b663d0029f7cce6a41f89ae8ecd8 (patch)
treed3de34126dc722abf9a539b951316acf5e9f98ab /network/murmur/rc.murmur
parent5a528e0685af880fe1d51e2db68cab4a49e7a186 (diff)
downloadslackbuilds-edc1cb3d4676b663d0029f7cce6a41f89ae8ecd8.tar.gz
network/murmur: Added to 12.1 repository
Diffstat (limited to 'network/murmur/rc.murmur')
-rw-r--r--network/murmur/rc.murmur41
1 files changed, 41 insertions, 0 deletions
diff --git a/network/murmur/rc.murmur b/network/murmur/rc.murmur
new file mode 100644
index 0000000000..8c2b159872
--- /dev/null
+++ b/network/murmur/rc.murmur
@@ -0,0 +1,41 @@
+#!/bin/bash
+
+PIDFILE="/var/run/mumble-server/mumble-server.pid"
+
+murmur_start() {
+ echo -n "Starting Murmur Server: "
+ if [ ! -f $PIDFILE ]; then
+ /usr/bin/murmurd -ini /etc/murmur.ini & > /dev/null 2>&1
+ echo "OK"
+ else
+ echo -n "Removing stale lock.. "
+ /bin/rm -f $PIDFILE
+ /usr/bin/murmurd -ini /etc/murmur.ini & > /dev/null 2>&1
+ echo "OK"
+ fi
+}
+
+murmur_stop() {
+ echo -n "Stopping Murmur: "
+ if [ -f $PIDFILE ]; then
+ /bin/kill $(/bin/cat $PIDFILE)
+ /bin/rm -f $PIDFILE
+ echo "OK"
+ else
+ echo "Not Running"
+ fi
+}
+
+case "$1" in
+ start)
+ murmur_start
+ ;;
+ stop)
+ murmur_stop
+ ;;
+ restart)
+ murmur_stop && (/bin/sleep 1 && murmur_start)
+ ;;
+ *)
+ echo "Usage: rc.murmur {start|stop|restart}"
+esac