Scripts and logs for multiple servers

Post here if you need help setting up your server, etc.
User avatar
Tank Program
Forum & Project Admin, PhD
Posts: 6712
Joined: Thu Dec 18, 2003 7:03 pm

Re: Scripts and logs for multiple servers

Post by Tank Program »

When it said <server#> it meant like 1, so that the folder would be server1. If you use test the folder has to be servertest.
Image
User avatar
AI-team
Shutout Match Winner
Posts: 1020
Joined: Tue Jun 23, 2009 6:17 pm
Location: Germany/Munich
Contact:

Re: Scripts and logs for multiple servers

Post by AI-team »

OK, so try this script:

Code: Select all

#!/bin/sh
screen -m -S $1 bin/armagetronad-dedicated --vardir /home/duke/aa/servers/$2/var/ --configdir /home/duke/aa/servers/$2/cfg/

Usage:

Code: Select all

./starter.sh <screen name> <server cfg/var directory>
An example start command:

Code: Select all

./starter.sh test server4
  
 
"95% of people believe in every quote you post on the internet" ~ Abraham Lincoln
 
 
User avatar
dukevin
Round Winner
Posts: 219
Joined: Mon Aug 30, 2010 8:25 am
Location: Southern California
Contact:

Re: Scripts and logs for multiple servers

Post by dukevin »

Ah, I finally tried what you said ai, but I think what you're saying is for ladderlog.

I'm trying to get server logs to go in separate directories based on which server they are logs of rather than all the logs being in /logs. (the logs I'm referring to are the ones generated by "screen -S $1 -X logfile /home/duke/aa/logs/$1_%d%m%Y-%c.log" in the srv script).

My first guess would be to modify that parameter to say :

Code: Select all

screen -S $1 -X logfile /home/duke/aa/servers/$1/logs/$1_%d%m%Y-%c.log
where $1 is the name of the server, but it didn't seem to work upon quick testing... but then again, server logs for some of my servers just randomly stop working for a while... hmm

edit: tried this 3 or 4 times with other servers, no luck either
Image
scene
Core Dumper
Posts: 128
Joined: Fri Aug 14, 2009 4:58 am

Re: Scripts and logs for multiple servers

Post by scene »

dukevin wrote:Ah, I finally tried what you said ai, but I think what you're saying is for ladderlog.

I'm trying to get server logs to go in separate directories based on which server they are logs of rather than all the logs being in /logs. (the logs I'm referring to are the ones generated by "screen -S $1 -X logfile /home/duke/aa/logs/$1_%d%m%Y-%c.log" in the srv script).

My first guess would be to modify that parameter to say :

Code: Select all

screen -S $1 -X logfile /home/duke/aa/servers/$1/logs/$1_%d%m%Y-%c.log
where $1 is the name of the server, but it didn't seem to work upon quick testing... but then again, server logs for some of my servers just randomly stop working for a while... hmm

edit: tried this 3 or 4 times with other servers, no luck either
Just to make sure its not the obvious, don't forget to make the "logs" directory writeable. I was able to do this, but instead i put the log files in /server/var/logs
Post Reply