--------------------------------------------------------------------------------
Battlefield 1942(tm) Server Manager 2.0 for Linux README
Version 2.0 beta 3i
3 September 2003
--------------------------------------------------------------------------------


1. INTRODUCTION

BF Server Manager 2.0 for Linux allows you to manage your Linux BF1942 server 
using BF Remote Server Manager 2.0 for Windows ("BFRM") available from 
"Black Bag Operations" (www.blackbagops.com).

BF Server Manager for Linux (or "BFSMD" for short) consists of a single 
executable (bfsmd) that may be run in the foreground or as a daemon. BFSMD 
acts as a server for BFRM clients. Up to 16 BFRM clients can connect to 
BFSMD simultaneously and manage the server.

For more information about the Black Bag Operations BF1942 server management 
utilities, visit http://www.blackbagops.com/bfutils.shtml.


2. INSTALLATION

1. Extract "bfsmd" from the distribution archive to /usr/bin or /usr/local/bin.
   # tar -xzvf BFServerManager20beta3i.tgz bfsmd
   # cp bfsmd /usr/bin
   # chmod 755 /usr/bin/bfsmd

2. Copy the UserAccess.con & ServerManager.con files from the distribution 
archive to the server's "Settings" directory. 

For example, if you installed the BF1942 server in /usr/bf1942, copy 
UserAccess.con & ServerManager.con to /usr/bf1942/mods/BF1942/Settings.

NOTE: If you are upgrading from a previous version of BFSMD skip step 2.


3. REQUIREMENTS 

BFSMD is dynamically linked and requires the 'ld' and 'libc' libraries to run. 
BFSMD was developed and tested using GLIBC v2.2.93 under Redhat 8.

BFSMD requires the /proc file system to be mounted and available. BFSMD uses a 
process walk to monitor the BF server process it manages.

BFSMD requires BFRM 2.0 beta 3i to connect, earlier versions will not connect.


4. USING BFSMD

BFSMD is configured using command-line options (only). Use the -? command-line 
switch to display a list of the available command-line options;

Usage: bfsmd [-path <path>] [-ip <ip>] [-port <port>] [-pid <path>] [-daemon] [-start] [-stop]
       [-restart] [-priority <#>] [-syslog <#>] [-quit] [-license] [+server args] [@server cmds]

where   -path <path>    is the /path/to/server/directory (no trailing slash)
        -ip <ip>        sets the server and bfsmd TCP/IP address (cannot be 0.0.0.0)
        -port <port>    sets the TCP port address of the bfsmd listen server (default 14667)
        -pid <path>     creates /path/to/pid/filename containing the bfsmd instance pid
        -daemon         daemonizes the bfsmd process
        -start          starts the server when bfsmd starts
        -stop           stops the server when bfsmd starts
        -restart        restarts the server process automatically after a crash
        -priority <#>   will renice the server to the given priority
        -syslog <#>     logs to specified syslog local facility 0-7 instead of bfsmd.log
        -quit           terminates bfsmd when the server process terminates unexpectedly
        -kill           terminates the instance of bfsmd referenced by the pid file given with -pid
        -license        displays software license agreement
        [+server args]  will be passed to the server process e.g. +game BF1942
        [@server cmds]  will be appended to serversettings.con e.g. @game.gameSpyPort 23000

By default, BFSMD will look in the current working directory for the BF1942 
server executable. If bf1942_lnxded resides in a different directory, you 
must specify the directory of the server you want to manage using -path.

By default, BFSMD will use TCP port 14667 to serve clients. If this port is 
already in use by a different instance of BFSMD or you wish to use a 
different port, use -port to change the port address of the BFSMD server.

By default, BFSMD will run in the foreground. To run BFSMD and the server 
in the background as a daemon, use -daemon.

By default, BFSMD will NOT restart the server in the event of a crash. Use 
-restart to make BFSMD automatically restart the server in the event of a crash.

By default, BFSMD will log to "bfsmd.log" in the directory you specified with 
-path. Use the -syslog switch to log to a local syslog facility instead.

Do not use -start to start the server until you have completed the steps under
"Getting Started" below.

Use -quit to retain the behaviour of bf1942_lnxded without BFSMD i.e. if the 
server crashes the bfsmd process will also terminate and return the exit code 
of the server process. This option is useful if you start bf1942_lnxded from 
a shell script and wish to retain the existing behaviour.

BFSMD will automatically append the +statusMonitor switch to the server 
command-line when starting the server if you do not specify it on the BFSMD
command-line. To disable the status monitor, use +statusMonitor 0.

Use +game <mod> to specify the mod to use when starting the server.

To change the file and directory used to save CSV stats, edit the value of the
"manager.statFilePath" setting in ServerManager.con.

A typical BFSMD command-line would like this;
/usr/bin/bfsmd -path /usr/bf1942 -restart -daemon +game DesertCombat


5. GETTING STARTED

STEP #1: Connect to BFSMD using BFRM.

  Start BFSMD in the server directory like so;
  # /usr/bin/bfsmd -port 14667

  BFSMD will display its log in the terminal so you can see any errors when
  they occur.

  At this point you should see BFSMD in netstat -nlut;

  Proto Recv-Q Send-Q Local Address           Foreign Address         State
  tcp        0      0 0.0.0.0:14667           0.0.0.0:*               LISTEN

  Start BFRM in Windows and connect using the following settings;
  
  Hostname/IP: <your server's IP goes here>
  BFSM Port: 14667
  BFSM User: admin    BFSM Pass: password
  
  At this point you should be connected to BFSMD and be able to configure the 
  server's settings.
  
STEP #2: Configure the server.

  The first thing to do is change the admin user account password! 
  
  1. Go to the Users dialog page in BFRM.
  2. Select the admin user in the list.
  3. Type a new password in the Password field.
  4. Click the user Save button (above the Delete button).
  5. Click the main Save button (in the main row of buttons down below).
  
  The second thing to do is configure the server's IP address;
  
  1. Go to the Server dialog page in BFRM.
  2. Type the IP address of your server in the IP Address field.
     NOTE: The server IP address cannot be 0.0.0.0. Use the local address of a 
     network interface card in the server computer.
  3. Click the main Save button.

  NOTE: You can also set the server IP using -ip on the bfsmd command-line.
     
  Configure the remaining server settings according to your preferences and
  click the main Save button when you are done.
  
  Be sure to also configure a map rotation on the Maps page. You cannot start
  the server until at least one map has been selected in the rotation.

STEP #3: Start the server.

  Click the Start button in BFRM to start the server. Watch the terminal window
  on the Linux server and you should see the server's status monitor appear.
  
  At this point you should be able to join the server and play.
  
  If the server fails to start, check the bfsmd log for error messages.

  Once you have verified the server starts correctly on your system using BFRM, 
  you can start BFSMD as a daemon using -daemon and use the -start command-line 
  option.


6. MORE INFORMATION

For complete instructions on how to install a BF1942 Linux server with bfsmd
see the HOWTO at http://www.blackbagops.com/howto-linux.shtml.

For more information about using BFSM 2.0 and BFRM 2.0 to manage your 
server, read the "Server Manager 2.0 Users Guide" available at
http://www.blackbagops.com/bfutils/bfsm20ug.pdf


7. LICENSE AGREEMENT

This software is made available under license agreement. See the LICENSE file 
in the distribution archive for terms and conditions under which this software 
may be used.


8. SUPPORT

This software is not endorsed or support by either Electronic Arts or Digital 
Illusions CE. Do not contact them about any problems you may experience while 
using this program.

Post bug reports at the Black Bag Operations forums in this thread;
http://www.blackbagops.com/forums/viewtopic.php?t=876

Post questions and other support requests in this forum;
http://www.blackbagops.com/forums/viewforum.php?f=8

Read the answer to frequently asked questions in the FAQ here;
http://www.blackbagops.com/faq.shtml

Get the latest version of BFSMD at "Black Bag Operations";
http://www.blackbagops.com/bfutils.shtml

Find contact details for the author of this software at;
http://www.blackbagops.com/contact.shtml


--------------------------------------------------------------------------------
END
--------------------------------------------------------------------------------