Hi all,
More of a linux newbie question than srcds (sorry) but I wonder if anyone can help please.
I'm trying to write some kind of script to run 3 separate instances of tf2 in 3 different directories. Currently we run 3 servers in the same orangebox folder but would like 1 non-modded, 1 mani and 1 other config.
So if I have: /games/tfserver1/orangebox, /games/tfserver2/orangebox, /games/tfserver3/orangebox
and I put the following in an executable file I get 'no such file or directory' from the cd line, which IS valid when I run the line at the console??
cd /home/games/tfserver1/orangebox
screen -A -m -d -S tf_server1 ./srcds_run -console -game tf -autoupdate +map ctf_2fort +maxplayers 24 +servercfgfile server1.
cfg -port 27015
cd /home/games/tfserver2/orangebox
screen -A -m -d -S tf_server2 ./srcds_run -console -game tf -autoupdate +map ctf_2fort +maxplayers 24 +servercfgfile server2.
cfg -port 27015
The screen command syntax is fine if I run it from within the orangebox directory, but I'd like to launch each one from a script in another directory rather than have to cd to each one and run it.
Any suggestions/help as to why the cd command isn't working please? Or is there a better way of doing it. Unforuntately I'm a linux script/shell/bash n00b
Thanks,
Dezz.
More of a linux newbie question than srcds (sorry) but I wonder if anyone can help please.
I'm trying to write some kind of script to run 3 separate instances of tf2 in 3 different directories. Currently we run 3 servers in the same orangebox folder but would like 1 non-modded, 1 mani and 1 other config.
So if I have: /games/tfserver1/orangebox, /games/tfserver2/orangebox, /games/tfserver3/orangebox
and I put the following in an executable file I get 'no such file or directory' from the cd line, which IS valid when I run the line at the console??
cd /home/games/tfserver1/orangebox
screen -A -m -d -S tf_server1 ./srcds_run -console -game tf -autoupdate +map ctf_2fort +maxplayers 24 +servercfgfile server1.
cfg -port 27015
cd /home/games/tfserver2/orangebox
screen -A -m -d -S tf_server2 ./srcds_run -console -game tf -autoupdate +map ctf_2fort +maxplayers 24 +servercfgfile server2.
cfg -port 27015
The screen command syntax is fine if I run it from within the orangebox directory, but I'd like to launch each one from a script in another directory rather than have to cd to each one and run it.
Any suggestions/help as to why the cd command isn't working please? Or is there a better way of doing it. Unforuntately I'm a linux script/shell/bash n00b
Thanks,
Dezz.