Debian Codegraph @

debian/fb-server.init

raw
1 #! /bin/sh
2
3 PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
4 DAEMON=/usr/lib/games/frozen-bubble/fb-server
5 DAEMON_OPTS="-c /etc/fb-server.conf"
6 NAME=fb-server
7 DESC="frozen-bubble game server"
8
9 test -x $DAEMON || exit 0
10
11 set -e
12
13 case "$1" in
14 start)
15 echo -n "Starting $DESC: "
16 start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \
17 --exec $DAEMON -- $DAEMON_OPTS >/dev/null
18 echo "$NAME."
19 ;;
20 stop)
21 echo -n "Stopping $DESC: "
22 start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid
23 echo "$NAME."
24 ;;
25 restart|force-reload)
26 echo -n "Restarting $DESC: "
27 start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid
28 sleep 1
29 start-stop-daemon --start --quiet --pidfile \
30 /var/run/$NAME.pid --exec $DAEMON -- $DAEMON_OPTS > /dev/null
31 echo "$NAME."
32 ;;
33 *)
34 N=/etc/init.d/$NAME
35 echo "Usage: $N {start|stop|restart|force-reload}" >&2
36 exit 1
37 ;;
38 esac
39
40 exit 0