I've written a smallish patch for the service handling of Windows Server 2008/Vista. Since I tend to run things as services on our company server running Windows 2008 I used sc.exe native windows tool for creating a service (easier than srvany). All went well but the service failed to start, stating timeout error. So I narrowed it down to the service manager return calls, since the service manager did not get any feedback as to when the service entered the running state. The patch also applies to stopping the service and the same timeout errors.
It relies on Win32::Daemon package (Info here: http://search.cpan.org/~daveroth/Win32-Scheduler_v20000702/lib/Win32/Scheduler.PM http://search.cpan.org/~daveroth/Win32-Scheduler_v20000702/lib/Win32/Scheduler.PM ), but the package is only required when running in daemon mode and only if the operating system is of NT (Windows) type. But since not everyone who runs this in daemon mode wants to run it as a service (and therefore install the Win32::Daemon package), I've added the --service option (Also RunAsService: Yes in the .cfg file) as a condition as well. Hopefully this will help some folks in the future if it gets implemented. Here's the patch: Diff Patches: http://n2.nabble.com/file/n1402041/mrtg.patch mrtg.patch http://n2.nabble.com/file/n1402041/MRTG_lib.patch MRTG_lib.patch Files: http://n2.nabble.com/file/n1402041/mrtg mrtg http://n2.nabble.com/file/n1402041/MRTG_lib.pm MRTG_lib.pm If you have any comments don't hesitate to write. Regards, David. -- View this message in context: http://n2.nabble.com/Patch-for-service-support-on-Vista-Server-2008-%28possibly-XP%29-tp1402041p1402041.html Sent from the MRTG Developers Mailinglist mailing list archive at Nabble.com. _______________________________________________ mrtg-developers mailing list [email protected] https://lists.oetiker.ch/cgi-bin/listinfo/mrtg-developers
