RegisterRegister    Log inLog in    SearchSearch   

Post new topic   Reply to topic
 
View previous topic :: View next topic  
Author Message
theWeird



PostPosted: Sun Jul 19, 2009 10:53 pm    Post subject: Custom startfile Reply with quote

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?
Back to top
View user's profile Send private message
adbot



PostPosted: Thu Mar 31, 2011 3:57 am 

Kybber



PostPosted: Mon Jul 20, 2009 4:00 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
Andrew
Mammoth


PostPosted: Mon Jul 20, 2009 1:00 pm    Post subject: Reply with quote

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).
Back to top
View user's profile Send private message
theWeird



PostPosted: Tue Jul 21, 2009 1:33 am    Post subject: Reply with quote

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.

Any idea what I can do?
Back to top
View user's profile Send private message
Andrew
Mammoth


PostPosted: Tue Jul 21, 2009 9:31 am    Post subject: Reply with quote

I'm not too sure, it sounds like you don't have permission to do that.

I've encountered this myself when I logged in as one user, and sudo'd to another user and tried to run a screen as them directly.

I would check Google.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
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


Forum powered by phpBB © 2001, 2005 phpBB Group
GameCreate Service Terms | Privacy Policy | © Copyright Mammoth Media 2001-2007
GameCreate™ is a trademark of Mammoth Media Pty Ltd. GameCreate® is a registered trademark in Australia.