Hosting multiple servers on Linux

From Bitfighter

It is possible to host multiple servers using a single install of Bitfighter. Here is how the official Bitfighter game server is organized:

The main game itself is installed in /home/autotron/bf013 All server-specific data is stored in /home/autotron/servers Each server has its own subfolder, which in turn has a levels and robots subfolders.

So the folder tree looks like this:

/home/autotron/bf013/install stuff  <-- SVN code checked out here, 
                                        built with dedicated option
               servers/classic/levels
                               robots
                       usrlevs/levels
                               robots
                       botlevs/levels
                               robots
                       ... 

Then, a shell script can be used to launch the servers:

 cd /home/autron/bf013/exe
 
 screen -dmS classic ./bitfighterd -hostname "Classic Levels" 
      -hostdescr "[Calif.] Classic levels shipped with Bitfighter" 
      -rootdatadir "/home/autotron/servers/classic" 
      -levelchangepassword changeit -adminpassword adminit
 
 screen -dmS userlevs./bitfighterd -hostname "User Submitted Levels" 
      -hostdescr "[Calif.] Levels submitted by users" 
      -rootdatadir "/home/autotron/servers/usrlevs" 
      -levelchangepassword changeit -adminpassword adminit
 
 screen -dmS robots./bitfighterd -hostname "Robot Levels" 
      -hostdescr "[Calif.] Where the robots play after happy hour" 
      -rootdatadir "/home/autotron/servers/botlevs" 
      -levelchangepassword changeit -adminpassword adminit
 ...

When an update to Bitfighter is available, the code can be updated and compiled easily, then the servers can be restarted. The whole upgrade process takes 5 minutes.