BF 1942 starting script for debian
Ferron
ferron at ferron.de
Wed Dec 11 17:24:57 EST 2002
Hi,
here the changes for the wellknown debian start-stop script assuming:
- you have the user gamesrv as user running the bf server
- path is /opt/bf1942/server/server1/bf1942-lnxded-1.2beta1
chnage the path and user name in the vars section and in the #changed
section marked
Ferron
pasted more so you can see what is changed-------------------
#! /bin/sh
#
# skeleton example file to build /etc/init.d/ scripts.
# This file should be used to construct scripts for
/etc/init.d.
#
# Written by Miquel van Smoorenburg <miquels at cistron.nl>.
# Modified for Debian GNU/Linux
# by Ian Murdock <imurdock at gnu.ai.mit.edu>.
#
# Version: @(#)skeleton 1.9 26-Feb-2001 miquels at cistron.nl
#
PATH=/opt/bf1942/server/server1/bf1942-lnxded-1.2beta1:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/opt/bf1942/server/server1/bf1942-lnxded-1.2beta1/bf1942_lnxded
ARGS="" #
NAME=bf1942_lnxded
DESC="BF1942 ServerDaemon"
test -x $DAEMON || exit 0
set -e
case "$1" in
start)
echo -n "Starting $DESC: "
#changed
cd /opt/bf1942/server/server1/bf1942-lnxded-1.2beta1
start-stop-daemon --start --chuid gamesrv --pidfile
/var/run/$NAME.pid \ --exec $DAEMON -- $ARGS > /dev/null 2>&1 &
##changed
echo "$NAME."
;;
stop)
More information about the Bf1942
mailing list