| Revision: | 1.1.1.1 (vendor branch) |
| Committed: | Fri Feb 3 07:11:47 2006 UTC (20 years, 8 months ago) by root |
| Branch: | UPSTREAM, MAIN |
| CVS Tags: | LAST_C_VERSION, rel-2_82, rel-2_81, rel-2_80, UPSTREAM_2006_03_15, rel-3_1, rel-3_0, rel-2_6, rel-2_7, rel-2_4, rel-2_5, rel-2_2, rel-2_3, rel-2_0, rel-2_1, rel-2_72, rel-2_73, rel-2_71, rel-2_76, rel-2_77, rel-2_74, rel-2_75, rel-2_54, rel-2_55, rel-2_56, rel-2_79, rel-2_52, rel-2_53, rel-2_32, UPSTREAM_2006_02_22, rel-2_90, rel-2_92, rel-2_93, rel-2_78, rel-2_61, UPSTREAM_2006_02_03, difficulty_fix_merge_060810_2300, rel-2_43, rel-2_42, rel-2_41, HEAD |
| Branch point for: | difficulty_fix |
| Changes since 1.1: | +0 -0 lines |
| Log Message: | initial import |
| # | User | Rev | Content |
|---|---|---|---|
| 1 | root | 1.1 | #! /bin/sh |
| 2 | # | ||
| 3 | # This file was automatically customized by debmake on Sun, 11 Oct 1998 18:12:42 -0700 | ||
| 4 | # | ||
| 5 | # Written by Miquel van Smoorenburg <miquels@drinkel.ow.org>. | ||
| 6 | # Modified for Debian GNU/Linux by Ian Murdock <imurdock@gnu.ai.mit.edu>. | ||
| 7 | # Modified for Debian by Christoph Lameter <clameter@debian.org> | ||
| 8 | |||
| 9 | PATH=/bin:/usr/bin:/sbin:/usr/sbin | ||
| 10 | DAEMON=/usr/games/crossfire | ||
| 11 | # The following value is extracted by debstd to figure out how to generate | ||
| 12 | # the postinst script. Edit the field to change the way the script is | ||
| 13 | # registered through update-rc.d (see the manpage for update-rc.d!) | ||
| 14 | FLAGS="defaults 50" | ||
| 15 | |||
| 16 | test -f $DAEMON || exit 0 | ||
| 17 | |||
| 18 | umask 002 | ||
| 19 | |||
| 20 | case "$1" in | ||
| 21 | restart|force-reload) | ||
| 22 | start-stop-daemon --stop --verbose --exec $DAEMON | ||
| 23 | echo -n "waiting a bit for the server to stop" | ||
| 24 | count=0 | ||
| 25 | while test "`ps aux|grep /usr/games/crossfire|wc -l`" -gt 1 | ||
| 26 | do | ||
| 27 | count=`expr $count + 1` | ||
| 28 | if [ $count -gt 30 ] | ||
| 29 | then | ||
| 30 | echo -n "crossfire not ready, not waiting any longer..." | ||
| 31 | break | ||
| 32 | fi | ||
| 33 | echo -n "." | ||
| 34 | sleep 1 | ||
| 35 | done | ||
| 36 | echo | ||
| 37 | start-stop-daemon --start --chuid games:games --verbose --exec $DAEMON -- -detach | ||
| 38 | ;; | ||
| 39 | start) | ||
| 40 | start-stop-daemon --start --chuid games:games --verbose --exec $DAEMON -- -detach | ||
| 41 | ;; | ||
| 42 | stop) | ||
| 43 | start-stop-daemon --stop --verbose --exec $DAEMON | ||
| 44 | ;; | ||
| 45 | *) | ||
| 46 | echo "Usage: /etc/init.d/crossfire {start|stop|restart}" | ||
| 47 | exit 1 | ||
| 48 | ;; | ||
| 49 | esac | ||
| 50 | |||
| 51 | exit 0 |