Impressive work, virusman. And almost what I want except that it doesn't protect against a server "hang" during shutdown.
Could you use the number passed through the function as a timeout value and make the function force-shutdown the server after the timeout if it hasn't already done so?
I'd suggest that if the value is less than a sensible minimum (20 or 30 seconds, perhaps) that the sensible minimum delay be used instead. Otherwise the value passed in is the number of seconds to wait for the shutdown to finish before sending a force-shutdown command.
Or would such protection be redundant? Does NWNX2 already provide this through its own monitoring functions? I haven't noticed nwnx2 forcing my server to shut down when it's gotten "hung up" during shutdown, but maybe I'm just too impatient to wait for it.
Modifié par Melkior_King, 24 janvier 2012 - 04:17 .