LinuxGSM icon indicating copy to clipboard operation
LinuxGSM copied to clipboard

Automated l4d2server Monitor does not check for Stop state

Open patriotgames opened this issue 12 years ago • 8 comments

Daniel, Thank you for creating these great scripts. I use a modified version of your L4D2 server script to manage 5+ servers, but have found one small bug:

If a server is intentionally stopped with "l4d2server stop" the monitor will automatically restart the server when using a Crontab automated monitor service:

*/2 * * * * /home/l4d2server/l4d2server monitor > /dev/null 2>&1

Notice I am using a 2 minute monitor cycle. It seems fn_monitorserver should have a check for an intentional Stop state as it does for an Update state. In other words, if I intentionally stop the sever the monitor should not restart it.

Thank you again for sharing your work.

Cheers, Patriot

patriotgames avatar Jun 20 '14 20:06 patriotgames

I agree. This also happens with the KF script.

zietbukuel avatar Jun 20 '14 20:06 zietbukuel

This is a great idea. I think some sort of lock file when started. The monitor could check if this is present. If not the monitor will not check the server is running.

dgibbs64 avatar Jun 20 '14 20:06 dgibbs64

That would be perfect! If you provide the code or a modified script, I would be glad to test it on my server and report back to you.

patriotgames avatar Jun 20 '14 21:06 patriotgames

Awesome give me a couple of weeks and I will release an update :)

dgibbs64 avatar Jun 20 '14 22:06 dgibbs64

I have just finished the concept and it works. Now I will just need to tidy up the code and add error handling etc.

dgibbs64 avatar Jun 20 '14 23:06 dgibbs64

Very nice Daniel, thanks :+1:

zietbukuel avatar Jun 20 '14 23:06 zietbukuel

Completed. This feature is now available on the current release. Let me know if you have any bugs etc.

dgibbs64 avatar Jun 24 '14 19:06 dgibbs64

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

lock[bot] avatar Jul 20 '18 04:07 lock[bot]