Page 1 of 1

Run as a service natively

Posted: February 18th, 2008, 6:20 am
by klontje
Hi,

I would like to suggest an option during install (on Windows platform) that lets you install Sabnzbd as a Windows service. I think a lot of people would like to run Sab as a service but really don't want the hassle of reconfiguring and downloading a resource kit, editing the registry etc. So just a choice during install for Normal installation or as a Service.

Re: Run as a service natively

Posted: February 18th, 2008, 6:21 am
by daniel_owen_uk
Count me in on this one would love it.

Re: Run as a service natively

Posted: February 18th, 2008, 6:26 am
by Usenet
I think it would be great, but it could be some hassle with distributing the needed binaries srvany.exe and instsrv.exe. An alternative service launcher https://slion.net/view/Dev/ExeService could maybe solve this?





-Popcorn rules!

Re: Run as a service natively

Posted: February 18th, 2008, 6:56 am
by klontje
I'm not a coder, but wouldn't it be possible to just make a service executable of sabnzbd just like any other native service?

Re: Run as a service natively

Posted: February 18th, 2008, 7:05 am
by Usenet
That would probably include some C coding and SAB is made in python. The executable in made with a py2exe program "just" wrapping py code for the win32 platform...
Im not a code either, and would be very happy if this could be done :)

Re: Run as a service natively

Posted: February 18th, 2008, 7:13 am
by switch
This will likely be looked into once 0.4.0 is ready for packing.

I think we can create a service for sab using a plugin in our installer (NSIS) http://nsis.sourceforge.net/How_do_I_st ... _a_service

I'm hoping this doesn't need any Windows 2003 resource kit stuff, but I personally haven't looked much into services much to know.

Re: Run as a service natively

Posted: February 27th, 2008, 12:56 pm
by Kenrin
so whats the difference between a native service and just adding it into your startup programs or using an external program to make it a service?  sorry if i sound dumb i just made a simple script for gnome session manager that executes it in the background.

Re: Run as a service natively

Posted: February 28th, 2008, 6:42 am
by mdamen
Difference between a native service and an external command like "srvany" to make it run like a service is that a native service is created to handle the start/stop/pause events sent by the SCM (Service Control Manager)
If you wouldn't use a native implementation, stopping SABnzbd using srvany will cause a "hard" shutdown.
I'm currently working on a service implementation for SABnzbd, not sure if I'll finish it before 0.4.0 though...

Re: Run as a service natively

Posted: February 28th, 2008, 2:52 pm
by Usenet
mdamen wrote: Difference between a native service and an external command like "srvany" to make it run like a service is that a native service is created to handle the start/stop/pause events sent by the SCM (Service Control Manager)
If you wouldn't use a native implementation, stopping SABnzbd using srvany will cause a "hard" shutdown.
I'm currently working on a service implementation for SABnzbd, not sure if I'll finish it before 0.4.0 though...
Hope you will make it in time. From the information on MSDN it looked like it wasnt to complicated to get an application to run as a service.
you say stopping SABnzbd using srvany will cause a "hard" shutdown but from the information in the logs it looks more like it receives a proper shutdown signal....

Re: Run as a service natively

Posted: February 29th, 2008, 5:03 am
by daniel_owen_uk
I used xynt to get 2.5 running as service and used to for a very long time without issue.

Difference between service and startup;

Fault tolerance, a service will bring itself back up if it dies
A service will run outside of a login or inside (with any specified user login).

Re: Run as a service natively

Posted: May 5th, 2008, 8:34 am
by pieteckhart
i use srvany.exe to run my SABnzbd+ as a service. I agree a native would be nicer but this is a good solution until it does has native support.

installing services with NSIS installer is easy i have done it myself once for a Quake 3 Mod.
Are there other usenet clients who can run as service out of the box?

i think this could really be a cool feature for families who share one computer. no-one is logged in and it keeps downloading. little brother logs in and doesn't even notice its running (Except for the Internet beeing slow as a turtle of course) ;)