AW: [bf1942] Best Method to run a linux server?

Frank Muller Hotstepper13 at gamersunitednetwork.de
Tue Dec 24 21:15:50 EST 2002


I use the following script

################################Script starts here
###########################

#!/bin/sh
while true
    do
        cd /usr/local/gameserver/battlefield/;
            ./bf1942_lnxded +game BF1942 +dedicated 1 +port 14567 +config
ServerSettings.con
        echo "Server last crashed on " >> /var/log/bf-gun.txt
        echo `/bin/date` >> /var/log/bf-gun.txt
    done
#eof

########################/Script###########################################

When i want to start the Server I use:
screen -dmS GUN_BF ./startserver.sh

it works very good, easy and fast :)

Also i have made a script wich is located in the /usr/sbin/ Dir.
I was originally designed to start multiple servers (e.g. i use the same
script for about 4 HL based Games and 4 UT2K3 servers)

################################Script starts here
###########################

#! /bin/sh
#
# This Script was designed to start multiple BF based Gameserver by a simple
command
#
# Written by Frank Mueller <Hotstepper13 at gamersunitednetwork.de>.
#

PATH=/bin:/usr/bin:/sbin:/usr/sbin


case "$1" in
  start)
    echo -e "\vStarting all BattleField GameServer\v"
    screen -dmS GUN_BF /usr/local/gameserver/battlefield/bf-startserver.sh
    echo -e "All BattleField Gameserver started\v"
    ;;
  stop)
    echo -e "\vStopping all BattleField GameServer\v"
    killall -9 bf-startserver.sh
    echo -e "All BattleField Gameserver stopped\v"
    ;;
  restart)
    echo -e "\vStopping all HL GameServer"
    killall -9 bf-startserver.sh
    echo -e "All HL GameServer stopped\v"
    echo -e "Starting all HL GameServer\v"
    screen -dmS GUN_BF /usr/local/gameserver/battlefield/bf-startserver.sh
    echo -e "done\v"
    ;;
  *)
    echo -e "\vUsage: bf {start|stop|restart}\v"
    exit 1
    ;;
esac

exit 0

########################/Script###########################################

I hope this might be useful for you. Feel free to use it. When you change
something please send me a notice. Maybe the change is also good for my
servers :)

BTW: We use Debian :) (apt-get rulez)

-----Ursprungliche Nachricht-----
Von: Dan Beimborn [mailto:bf at beimborn.com]
Gesendet: Montag, 23. Dezember 2002 21:02
An: bf1942 at icculus.org
Betreff: Re: [bf1942] Best Method to run a linux server?


On Mon, 23 Dec 2002, Billy Vierra wrote:

> What is the best way to run the server in the background? do you go with
> screen? just &? something else?

I do it under vnc. That's a remote desktop-sharing utility if you aren't
familiar, servers & clients run under windows,linux,solaris, hpux, macos,
etc etc. Very nice. www.realvnc.org for both client & server.

In my session I currently have 1 xterm with the server in it, one window
with "watch -n 1 lsof -i | grep bf1942" (shows ports in use), and gkrellm
(a graphical load meter/network load/memory usage/etc widget). The 3rd
xterm has pine running on the account that is subscribed to this mailing
list. It uses up cpu when it's running, so I just detach it when I'm
not just trying to watch the pretty lights. My client is win2k or linux,
win2k if I'm not playing, linux on the laptop if I'm playing on the
desktop machine!

Highly recommended for any kind of remote administration, can be wrapped
in ssh if you are paranoid like me too :)

DB




More information about the Bf1942 mailing list