aboutsummaryrefslogtreecommitdiff
path: root/network/warvox/rc.warvox
diff options
context:
space:
mode:
Diffstat (limited to 'network/warvox/rc.warvox')
-rw-r--r--network/warvox/rc.warvox30
1 files changed, 30 insertions, 0 deletions
diff --git a/network/warvox/rc.warvox b/network/warvox/rc.warvox
new file mode 100644
index 0000000000..dd083c09bf
--- /dev/null
+++ b/network/warvox/rc.warvox
@@ -0,0 +1,30 @@
+#!/bin/sh
+
+PORT=7777
+PIDFILE="/var/run/warvox/mongrel.pid"
+
+start() {
+ echo "Starting WarVOX: warvox -p ${PORT} -d "
+ warvox -p $PORT -d
+}
+
+stop() {
+ echo "Stopping WarVOX..."
+ kill $(cat $PIDFILE)
+}
+
+case "$1" in
+ start)
+ start
+ ;;
+ stop)
+ stop
+ ;;
+ restart)
+ stop
+ sleep 1
+ start
+ ;;
+ *)
+ echo "Usage: $0 (start|stop|restart)"
+esac