Posted: Fri Jun 19, 2009 9:27 pm Post subject: Make a game use port%server:port%.pid files
I need to start a game from a script (Trackmania Forever) in order to launch
some additional commands afterwards. I have renamed the original executable
and created a script with the original name which launches the executable
and puts it into the background. The problem is that GC checks for the existence
of the PID of the script, and not of the game which was launched into the
background. This causes GC to try and restart the game, it fails because
there is no such PID, and it attempts to start it all over again.
I am able to obtain the PID from within the script by the special variable
$!. I've tried to put the PID into a port%server:port%.pid file, but GC
ignores it. My guess is that you tag which games should use pid-files and
which should use the returned PID. Is there any way for me to tell GC which
PID to use, e.g. by using a port%server:port%.pid file?
Andrew suggests you set the game to run in a screen via the GC configuration, so GC would kill the screen and anything in it.
This should mean your wrapper script would be killed too.
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