0.2.9-sty+ct_alpha_r758 --input problem
0.2.9-sty+ct_alpha_r758 --input problem
hey there!
I'm running the server version: 0.2.9-sty+ct_alpha_r758 unix dedicated
Lately when I tried using --input "path/to/file", the server doesn't read the data streaming to the file.
Is this a fixable problem?
I'm running the server version: 0.2.9-sty+ct_alpha_r758 unix dedicated
Lately when I tried using --input "path/to/file", the server doesn't read the data streaming to the file.
Is this a fixable problem?
Re: 0.2.9-sty+ct_alpha_r758 --input problem
Do you append to the file or whipe it before writing?
It will only work if you append to the file.
It will only work if you append to the file.
Re: 0.2.9-sty+ct_alpha_r758 --input problem
LOVER$BOY wrote:im appending to the file... is that the problem?
Doublecheck your path? Sorry, can't help more.Jip wrote:It will only work if you append to the file.
Re: 0.2.9-sty+ct_alpha_r758 --input problem
ya I double checked the path but it isn't working.
The only way it is working right now is by using tail -n0 -f -s 0.01 $cmd | $tron | tee $log but I don't like to use tail because for some reason the server isn't restarting when it crashes and im thinking it's got something to do with tail being in there...
The only way it is working right now is by using tail -n0 -f -s 0.01 $cmd | $tron | tee $log but I don't like to use tail because for some reason the server isn't restarting when it crashes and im thinking it's got something to do with tail being in there...
Re: 0.2.9-sty+ct_alpha_r758 --input problem
ya I double checked the path but it isn't working.
The only way it is working right now is by using tail -n0 -f -s 0.01 $cmd | $tron | tee $log but I don't like to use tail because for some reason the server isn't restarting when it crashes and im thinking it's got something to do with tail being in there...
The only way it is working right now is by using tail -n0 -f -s 0.01 $cmd | $tron | tee $log but I don't like to use tail because for some reason the server isn't restarting when it crashes and im thinking it's got something to do with tail being in there...
Re: 0.2.9-sty+ct_alpha_r758 --input problem
ya I double checked the path but it isn't working.
The only way it is working right now is by using tail -n0 -f -s 0.01 $cmd | $tron | tee $log but I don't like to use tail because for some reason the server isn't restarting when it crashes and im thinking it's got something to do with tail being in there...
The only way it is working right now is by using tail -n0 -f -s 0.01 $cmd | $tron | tee $log but I don't like to use tail because for some reason the server isn't restarting when it crashes and im thinking it's got something to do with tail being in there...
Re: 0.2.9-sty+ct_alpha_r758 --input problem
I didn't know about input and had made a hacky (and now lost, can't post it because of that, sorry ) addition to that tail -n0.... script which checked like every few minutes if the server was still running, if not, it killed all the other stuff and started over. Maybe that's an idea for a workaround.LOVER$BOY wrote:ya I double checked the path but it isn't working.
The only way it is working right now is by using tail -n0 -f -s 0.01 $cmd | $tron | tee $log but I don't like to use tail because for some reason the server isn't restarting when it crashes and im thinking it's got something to do with tail being in there...
Code: Select all
-d, --daemon : allow the dedicated server to run as a daemon
(will not poll for input, unless overridden by --input)
--input <file> : Poll for input from this file in addition to/instead of
(if -d is also given) stdin. Can be used multiple times.
Re: 0.2.9-sty+ct_alpha_r758 --input problem
so u want me to try
Code: Select all
$tron -d --input $file
Re: 0.2.9-sty+ct_alpha_r758 --input problem
Hmm never mind, I tested --input and it works perfectly with executing server (same version as you) and parser (something that outputs a test message when i enter) via
(exactly like here) and with the --input, where $foo is the file the server reads from.
Maybe it has problems with $file because "file" is a console command as well.
If you're writing to the file from the parser in another way than this quick&dirty test, it's that part which fails, --input is fine.
If you basically have the same code, well, triple check the path.
I don't know if it cares for absolute/relative paths, I used the absolute path for $foo in the test (/home/username/testfile in that case).
Edit: whoops, fixed the code blocks
Code: Select all
tail -n0 -f -s 0.01 $ladderlog | $parser | tee -a $foo
Code: Select all
$tron --userconfigdir $userconfigdir --vardir $var --input $foo
Maybe it has problems with $file because "file" is a console command as well.
If you're writing to the file from the parser in another way than this quick&dirty test, it's that part which fails, --input is fine.
If you basically have the same code, well, triple check the path.
I don't know if it cares for absolute/relative paths, I used the absolute path for $foo in the test (/home/username/testfile in that case).
Edit: whoops, fixed the code blocks
Re: 0.2.9-sty+ct_alpha_r758 --input problem
well $file was just an example but im using currently:
so I replace tail line with
you think that's the way to go about it?
Code: Select all
#!/bin/bash
loc="/home/arma/loverboy/alpha2/"
tron=$loc"bin/armagetronad-dedicated"
server=$loc"server/"
vardir=$loc"var/"
log=$server"console.log"
cmd=$server"cmd.txt"
mkdir $server"logs"
screen -S racingserver -X logtstamp on
screen -S racingserver -X logfile $server"logs/"racingserver.log
screen -S racingserver -X log on
while true; do
tail -n0 f -s 0.01 $cmd | $tron --vardir $vardir | tee -a $log
echo "======================== Server Restarting ========================" >> $log
sleep 5
done
Code: Select all
$tron --input $cmd --vardir $vardir | tee -a $log
Re: 0.2.9-sty+ct_alpha_r758 --input problem
Exactly. At least that's what worked for me.LOVER$BOY wrote: so I replace tail line withyou think that's the way to go about it?Code: Select all
$tron --input $cmd --vardir $vardir | tee -a $log
Re: 0.2.9-sty+ct_alpha_r758 --input problem
No, it didn't work...
BTW, appending to the file as in like this?: Is that the way you're talking about Jip?
BTW, appending to the file as in like this?:
Code: Select all
tail -n0 -f -s 0.01 $ladderlog | php ./script.php >> $cmd