Scripts and logs for multiple servers
- Tank Program
- Forum & Project Admin, PhD
- Posts: 6712
- Joined: Thu Dec 18, 2003 7:03 pm
Re: Scripts and logs for multiple servers
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.

- 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
OK, so try this script:
Usage:
An example start command:
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>
Code: Select all
./starter.sh test server4
"95% of people believe in every quote you post on the internet" ~ Abraham Lincoln
- dukevin
- Round Winner
- Posts: 219
- Joined: Mon Aug 30, 2010 8:25 am
- Location: Southern California
- Contact:
Re: Scripts and logs for multiple servers
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 :
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
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
edit: tried this 3 or 4 times with other servers, no luck either

Re: Scripts and logs for multiple servers
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/logsdukevin 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 :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... hmmCode: Select all
screen -S $1 -X logfile /home/duke/aa/servers/$1/logs/$1_%d%m%Y-%c.log
edit: tried this 3 or 4 times with other servers, no luck either