[cod] Running CoD servers as a Linux Daemon

david at fuess.net david at fuess.net
Mon Dec 6 08:26:08 EST 2004


Simply stated, yes! I use screen, and seriously considered the
alternative of daemon tools. However, I don't run the game directly in
screen, I actually run a script in screen that accomplishes a number of
things. For one, it performs the automated game restart if the games
dies, but it also manages the game mod setup and makes a local log
entry when the restart occurs. It also rotates the logs and manages the
monthly statistics reset. There is a general cleanup section where it
looks for things to delete/move before starting the game server. Now to
perform a mod install, "cleanup", logcycling, or stats reset all I have
to do is send the "quit" command via rcon.

Also, as stated elsewhere in this thread, we often attach to the screen
(and may have multiple admins attached simultaneously) to dynamically
reconfigure the server or just monitor the console where we can keep an
eye on the game server and the play itself.

We find Screen to be very useful indeed.

> -------- Original Message --------
> Subject: Re: [cod] Running CoD servers as a Linux Daemon
> From: "Jay Vasallo" <jayco1 at charter.net>
> Date: Sun, December 05, 2004 12:42 pm
> To: cod at icculus.org
> 
> No screen needed. Don't know why anyone would want to run the process if they didn't need to. Does it have any denefits or help the game in any way?
> 
>   ----- Original Message ----- 
>   From: [MgA]RockCrusher 
>   To: cod at icculus.org 
>   Sent: Sunday, December 05, 2004 1:49 PM
>   Subject: Re: [cod] Running CoD servers as a Linux Daemon
> 
> 
>   Thanks Jay.  I was wondering about the use of Screen within a Daemon job. 
> 
>   Any suggestions as to the run startup script for CoD is you don't use screen and use setusergid?
>     ----- Original Message ----- 
>     From: Jay Vasallo 
>     To: cod at icculus.org 
>     Sent: Saturday, December 04, 2004 12:07 AM
>     Subject: Re: [cod] Running CoD servers as a Linux Daemon
> 
> 
>     I do not use screen with daemon tools. The run file that you create, or your start script is monitored thru daemon. If the process is killed with a console command 
> 
>     \rcon quit, 
> 
>     the supervise process restarts the server. 
> 
>     If you have mutliple servers booting off of  main game installtion files, it is always wise to leave a server config in the main installtion. When the server starts it will use the main installtion server.cfg if the user's config is not present.
> 
>     If a client does not have a file or config properly edited or in the correct folder, the process will not restart. Always keep a server.cfg located in your main installation. 
> 
>     Example:
> 
>     Main installation server config at /games/cod/cod-server/uo/server.cfg
> 
>     User's server config at /home/user/cod-server/uo/server.cfg
> 
>     If configs are not present, I have seen the process take the whole cpu at 99%. 
> 
> 
>     Daemontools is good program if installed correctly. Once installed, the program will create a folder called /service 
>     cd /service
> 
>     Now create a folder and name it whatever the user is named.
> 
>     mkdir sbclan
> 
>     Now if you do the "ls" command, you will notice that there is now a folder called /service/sbclan/supervise 
>     This is made by daemon tolls. Don't even bother with this folder. Let it be.
> 
>     Now you have to have created a start script and call it run. Copy the run file so it ends up as 
>     /service/sbclan/run. The run file has have the setusergid command within the file . http://cr.yp.to/daemontools/setuidgid.html
> 
>     now "chmod +x run" and the service will start. you will also notice that the server has started.
> 
>     svc -d /service/sbclan  - will kill the server.
>     svc -u /service/sbclan - will restart the server
> 
> 
>     Once in a great while, I enter my ventrilo boxes and give the "ps aux" command to see all the processes. If a notice an error, i killed the process by thru daemon and search for the config error. After correcting the error, I would restart the process.
> 
>     I like using it, unlike many other people.
> 
>     cheers
>       ----- Original Message ----- 
>       From: Robert Mount 
>       To: cod at icculus.org 
>       Sent: Friday, December 03, 2004 10:28 PM
>       Subject: Re: [cod] Running CoD servers as a Linux Daemon
> 
> 
>       > You can run them on deamon tools
> 
>       Does deamontools let you monitor a screen process?  I've tried Cron and ended up with multiple server instances (periodically, like one extra server per day or so).
> 
>       --Rob




More information about the Cod mailing list