| 1 |
sysadm |
1.1 |
# -*- sh -*-
|
| 2 |
|
|
#
|
| 3 |
|
|
# bnetd Script to control the Unix Battle.net Daemon
|
| 4 |
|
|
#
|
| 5 |
|
|
# Author: Hakan Tandogan <hakan@gurkensalat.com>
|
| 6 |
|
|
#
|
| 7 |
|
|
# chkconfig: 2345 21 79
|
| 8 |
|
|
# description: bnetd is a Unix clone of the Battle.net Daemon
|
| 9 |
|
|
#
|
| 10 |
|
|
|
| 11 |
|
|
# Source function library.
|
| 12 |
|
|
. /etc/rc.d/init.d/functions
|
| 13 |
|
|
|
| 14 |
|
|
# See how we were called.
|
| 15 |
|
|
case "$1" in
|
| 16 |
|
|
start)
|
| 17 |
|
|
# Start daemons.
|
| 18 |
|
|
echo -n "Starting bnetd: "
|
| 19 |
|
|
daemon bnetd
|
| 20 |
|
|
echo
|
| 21 |
|
|
touch /var/lock/subsys/bnetd
|
| 22 |
|
|
;;
|
| 23 |
|
|
|
| 24 |
|
|
stop)
|
| 25 |
|
|
# Stop daemons.
|
| 26 |
|
|
echo -n "Shutting down bnetd: "
|
| 27 |
|
|
killproc bnetd
|
| 28 |
|
|
echo
|
| 29 |
|
|
rm -f /var/lock/subsys/bnetd
|
| 30 |
|
|
;;
|
| 31 |
|
|
|
| 32 |
|
|
reload)
|
| 33 |
|
|
$0 stop
|
| 34 |
|
|
$0 start
|
| 35 |
|
|
;;
|
| 36 |
|
|
|
| 37 |
|
|
restart)
|
| 38 |
|
|
$0 stop
|
| 39 |
|
|
$0 start
|
| 40 |
|
|
;;
|
| 41 |
|
|
|
| 42 |
|
|
status)
|
| 43 |
|
|
status bnetd
|
| 44 |
|
|
;;
|
| 45 |
|
|
|
| 46 |
|
|
*)
|
| 47 |
|
|
echo "Usage: bnetd {start|stop|restart|reload|status}"
|
| 48 |
|
|
exit 1
|
| 49 |
|
|
esac
|
| 50 |
|
|
|
| 51 |
|
|
exit 0
|