Running a Server

From Tronwiki
(Difference between revisions)
Jump to: navigation, search
Line 14: Line 14:
 
  tail -n0 -f -s 0.01 $edlog | $parser | $tron --userconfigdir $userconfigdir --vardir $var | tee -a $log
 
  tail -n0 -f -s 0.01 $edlog | $parser | $tron --userconfigdir $userconfigdir --vardir $var | tee -a $log
  
 +
--Running a Scripted Server in one screen session--
 
Alternativey, for debugging, you might want to write the cmds to a seperate text file for reading. This allows you to modify the parser as the server is running and restart it.
 
Alternativey, for debugging, you might want to write the cmds to a seperate text file for reading. This allows you to modify the parser as the server is running and restart it.
  
 
  tail -f -n0 -s 0.01 /path/to/edlog.txt | /path/to/parser.php | tee -a /path/to/cmds.txt
 
  tail -f -n0 -s 0.01 /path/to/edlog.txt | /path/to/parser.php | tee -a /path/to/cmds.txt
  
Then run the server with:
+
Then run the server on a separate screen session with:
  
 
  #!/bin/sh
 
  #!/bin/sh

Revision as of 11:31, 3 October 2007

How to use all these new features on a server. Scripts. Php is the language used by most, but bash, perl, python, anything that can read text from standard input and write to a text file should work.

To start the server, which will read the file edlog.txt, feed that into the parser script, then write the output of that into arma server, which will use tee to display the console log, use something like this shell script:

#!/bin/sh
tron="/path/to/bin/armagetronad-dedicated"
var="/path/to/var/"
log="${var}console_log.txt"
userconfigdir="/path/to/config/"
parser="/path/to/parser.php"
edlog="${var}edlog.txt"

tail -n0 -f -s 0.01 $edlog | $parser | $tron --userconfigdir $userconfigdir --vardir $var | tee -a $log

--Running a Scripted Server in one screen session-- Alternativey, for debugging, you might want to write the cmds to a seperate text file for reading. This allows you to modify the parser as the server is running and restart it.

tail -f -n0 -s 0.01 /path/to/edlog.txt | /path/to/parser.php | tee -a /path/to/cmds.txt

Then run the server on a separate screen session with:

#!/bin/sh
tron="/path/to/bin/armagetronad-dedicated"
var="/path/to/var/"
log="${var}console_log.txt"
userconfigdir="/path/to/config/"
parser="/path/to/parser.php"
edlog="${var}edlog.txt"
cmds="${var}cmds.txt"
tail -n0 -f -s 0.01 $cmds | $tron --userconfigdir $userconfigdir --vardir $var | tee -a $log
Personal tools