3
# Written by Miquel van Smoorenburg <miquels@cistron.nl>
4
# Modified for Debian by Ian Murdock <imurdock@gnu.ai.mit.edu>
9
# Required-Start: $local_fs $remote_fs $syslog $network $time
10
# Required-Stop: $local_fs $remote_fs $syslog $network
11
# Default-Start: 2 3 4 5
13
# Short-Description: Gaming server that emulates Battle.net(R)
14
# Description: control bnetd daemon
19
. /lib/lsb/init-functions
21
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
22
DAEMON=/usr/sbin/bnetd
26
# checks for the pvpgn support files
29
# list of files in pvpgn-support-1.2.tar.gz
46
if [ ! -f "/var/lib/pvpgn/files/$i" ]; then
51
if [ "$START" = "0" ]; then
53
echo "You are missing the pvpgn support files and daemon will not start without them."
54
echo "Run 'sudo pvpgn-support-installer' or read /usr/share/doc/pvpgn/README.Debian"
60
test -x $DAEMON || exit 0
65
echo -n "Starting $DESC: "
66
start-stop-daemon --start --quiet --exec $DAEMON -- $DAEMON_OPTS
70
echo -n "Stopping $DESC: "
71
start-stop-daemon --stop --quiet --oknodo --exec $DAEMON
75
status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
79
echo -n "Restarting $DESC: "
80
start-stop-daemon --stop --quiet --exec $DAEMON
82
start-stop-daemon --start --quiet --exec $DAEMON -- $DAEMON_OPTS
87
echo "Usage: $N {start|stop|restart|status|force-reload}" >&2