Topic: HOWTO: dedicated warsow server on linux
This thread won't be updated regularly from now on, please have a look at the Wiki article instead.
Requirements
You need a x86 computer running an up-to-date linux distribution, which you can access either directly or via SSH. (I will not explain how to connect to a linux console here, because this should be clear for everybody who runs such a computer.)
I also assume that you have your favourite editor set to $EDITOR and that you're quite familiar on how to edit text files (especially server configuration files). If you stick to my guide really closely, you will also need wget, tar (with gzip support) and screen. However, these tools should be available on every linux computer.
Installation
Firstly, fetch the current linux version of Warsow (the full version, not the update) from the official page.
wget http://ftp.club-internet.fr/pub/games/nofrag/warsow/warsow_0.2_linux.tar.gzSecondly, extract the archive.
tar xfz warsow_0.2_linux.tar.gzNow, you have a new folder called "warsow" which contains all media and the x86 linux executable. Although one could start the server right now using wsw_server, one should first edit the server's config file for one's needs.
cd warsow
$EDITOR basewsw/dedicated_autoexec.cfgAfter having done so, one could simply run the server with
./wsw_serverTricks
But what if the server crashes? You would have to fire it up again manually, which really sucks. ![]()
We can just put the server into a loop which constantly restarts the process if it quits. To do this, simply create a textfile with the name dedicated.sh with the following content.
#!/bin/sh
while true; do
./wsw_server
doneNow we need to make this file executable with
chmod u+x dedicated.shIf you now run the file dedicated.sh, it starts the server over and over again, until you kill the loop. The bad thing about this is, that the process would run in the foreground and as soon as you close the console, your server would be gone. One could send the process into the background with adding an ampersand (&) after the command line which starts the server, but this would make you unable to access the server's console again.
Because of this, I use screen to call my Warsow server like this:
screen -A -m -d -S warsowtdm ./dedicated.shThis launches my Warsow server in the background using a screen session named "warsowtdm" and I'm still able to re-attach it with:
screen -r warsowtdmand detach it again pressing Ctrl+A, D.
Last edited by hangy (2006-09-15 14:21)