ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/rpm/crossfire.init
Revision: 1.1
Committed: Fri Feb 3 07:14:23 2006 UTC (18 years, 3 months ago) by root
Branch point for: UPSTREAM, MAIN
Log Message:
Initial revision

File Contents

# Content
1 #!/bin/sh
2 #
3 # /etc/rc.d/init.d/crossfire
4 #
5 # Starts crossfire as a gameserver.
6 #
7 # chkconfig: 345 99 1
8 # description: Server for Crossfire, a nethack/Gauntlet(TM) type \
9 # game for X Windows.
10
11 # Source function library.
12 . /etc/rc.d/init.d/functions
13
14 #
15 # See how we were called.
16 #
17 case "$1" in
18 start)
19 # Check if crossfire is already running
20 if [ ! -f /var/lock/subsys/crossfire ]; then
21 echo -n 'Starting crossfire server: '
22 daemon /usr/games/crossloop &
23 echo
24 touch /var/lock/subsys/crossfire
25 fi
26 ;;
27 stop)
28 echo -n 'Stopping crossfire server: '
29 killall crossloop
30 echo -n "crossloop "
31 killproc crossfire
32 echo
33 rm -f /var/lock/subsys/crossfire
34 ;;
35 reload|restart)
36 echo -n 'Restarting crossfire server: '
37 killproc crossfire
38 echo
39 ;;
40 status)
41 status /usr/games/crossfire
42 ;;
43 *)
44 echo "Usage: /etc/rc.d/init.d/crossfire {start|stop|restart|reload|status}"
45 exit 1
46 esac
47
48 exit 0