summaryrefslogtreecommitdiff
path: root/network/warvox/rc.warvox
blob: dd083c09bfdbeb73a8ce31aed2ed7cb283d28f32 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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