Posted: Sun Jul 19, 2009 10:53 pm Post subject: Custom startfile
Hey there
I've got a small problem with the game "Teeworlds"
I'd like to run some instances with different mods.
By default teeworlds is started using the file teeworlds_srv.
But if you want to use a mod - e.g. the ball mod - you have to start the modified binary ball_srv instead.
I can't modify the full command line that is used to start the server.
It is only possible to modify the parameters.
Could you make it possible to change the file a server is started with?
Are you using Linux? If so, then simply make a wrapper-script with the name
of the original exe, which fires off the correct exe based on the an argument
on the command line. Rename the original exe to e.g. teeworlds_srv_orig.
You can then let e.g. the first argument be "default" og "ballmod", and have
a case-select statement in the script to select which exe to run. Or even simpler:
Use the name of which exe to run as the argument to avoid the case-select.
99% of games do not need this feature; and its also a security risk (run arbitrary executables).
Kybber's suggestion is good; you can run the game in a screen (see Game Configuration) to ensure when the server is Stopped via gamecreate, the game is shutdown (the screen and everything in it).
Thank you for this hint.
Now I wrote a script to start the server with.
But there is one problem with screen.
It seems user 'gamecreate' is not allowed to open a screen session on the server.
If I just type 'screen' as user gamecreate, the answer is
Cannot open your terminal '/dev/pts/0' - please check.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum