Hey all,
I am running DelugeD on Windows home server 2011, and so far it seems to be working great. I was not able to get it to work as a service (the process would be running, but no thin clients could connect to it), so I have it set up to run as a user on boot using a startup trigger.
My issue is that when the computer is shutdown for any reason, the process does not terminate gracefully, resulting in recheck every single time the program comes back up. Is there anyway to make sure that deluged terminates gracefully before the server reboots? It reboots automatically based off of other triggers in programs, so I dont have a set schedule or any easy way of predicting reboot times. Please let me know if there is anyway to make sure that the daemon closes gracefully before the machine goes down. Thanks!
Gracefully close Deluged?
Re: Gracefully close Deluged?
My initial thought were that it might be too many torrents prevently deluged exiting nicely. However I just found that apparently there is no handling in Windows 7 (assume same as WHS'11) for SetConsoleCtrlHandler which waits for CTRL_SHUTDOWN_EVENT.
I found an interesting script to stall shutdown and perform your own clean shutdown: http://stackoverflow.com/questions/1114 ... -kills-all
and another to help with debugging: http://stackoverflow.com/questions/5209 ... 00#2673800
What is interesting about the above link is that it mentions "The application must shutdown within 5 seconds (20 seconds for services)." so in your case deluged has not much time to close gracefully.
I found an interesting script to stall shutdown and perform your own clean shutdown: http://stackoverflow.com/questions/1114 ... -kills-all
and another to help with debugging: http://stackoverflow.com/questions/5209 ... 00#2673800
What is interesting about the above link is that it mentions "The application must shutdown within 5 seconds (20 seconds for services)." so in your case deluged has not much time to close gracefully.
Re: Gracefully close Deluged?
Awesome, thanks for the reply. I'll look into setting up a python install on my box and see how it goes. Thanks for the help, and Ill post back when I get a chance to set up the options as detailed in those two links. Thanks!