11-18-2009, 05:26 AM
Hey,
I'm looking for a SRCDS restart script, as you know Linus SRCDS's eat ram after idleing for too long, and tend to run a bit better after a restart. Also restarting a war server mid EUGL/ESL/League game would = hours of ear bleed from the community. So I've though about this:
Using a PHP script run on the hour from crontab, that queries my SRCDS's for the player count. If the player count is 1 or above (I don't know what sourceTV will count as) to run another script that kills the SRCDS by "kill /pathtosrcds/pid.pidfile"
It's the script to query the game server that I don't know how to do, I've though about using PHP as I know there is allot of socket stuff to do this, but I',m not sure how.
I'm also open to suggestions for alternative ways of doing this
-Christy
I'm looking for a SRCDS restart script, as you know Linus SRCDS's eat ram after idleing for too long, and tend to run a bit better after a restart. Also restarting a war server mid EUGL/ESL/League game would = hours of ear bleed from the community. So I've though about this:
Using a PHP script run on the hour from crontab, that queries my SRCDS's for the player count. If the player count is 1 or above (I don't know what sourceTV will count as) to run another script that kills the SRCDS by "kill /pathtosrcds/pid.pidfile"
It's the script to query the game server that I don't know how to do, I've though about using PHP as I know there is allot of socket stuff to do this, but I',m not sure how.
I'm also open to suggestions for alternative ways of doing this
-Christy