Run as a service natively

Want something added? Ask for it here.
Post Reply
klontje
Newbie
Newbie
Posts: 8
Joined: February 17th, 2008, 3:34 pm

Run as a service natively

Post 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.
daniel_owen_uk
Release Testers
Release Testers
Posts: 126
Joined: January 24th, 2008, 6:43 am

Re: Run as a service natively

Post by daniel_owen_uk »

Count me in on this one would love it.
Usenet
Jr. Member
Jr. Member
Posts: 87
Joined: February 12th, 2008, 6:04 pm

Re: Run as a service natively

Post 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!
klontje
Newbie
Newbie
Posts: 8
Joined: February 17th, 2008, 3:34 pm

Re: Run as a service natively

Post 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?
Usenet
Jr. Member
Jr. Member
Posts: 87
Joined: February 12th, 2008, 6:04 pm

Re: Run as a service natively

Post 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 :)
User avatar
switch
Moderator
Moderator
Posts: 1380
Joined: January 17th, 2008, 3:55 pm
Location: UK

Re: Run as a service natively

Post 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.
Kenrin
Newbie
Newbie
Posts: 3
Joined: February 26th, 2008, 10:57 am

Re: Run as a service natively

Post 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.
mdamen
Newbie
Newbie
Posts: 2
Joined: February 16th, 2008, 1:03 pm

Re: Run as a service natively

Post 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...
Usenet
Jr. Member
Jr. Member
Posts: 87
Joined: February 12th, 2008, 6:04 pm

Re: Run as a service natively

Post 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....
daniel_owen_uk
Release Testers
Release Testers
Posts: 126
Joined: January 24th, 2008, 6:43 am

Re: Run as a service natively

Post 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).
User avatar
pieteckhart
Release Testers
Release Testers
Posts: 131
Joined: April 30th, 2008, 9:34 am
Location: Netherlands
Contact:

Re: Run as a service natively

Post 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) ;)
SABnzbd+ Windows 7 Gadget
Manage your downloads from your desktop.
Download: http://eckhart.hopto.org/sabgadget/sabgadget2.gadget
Site: http://eckhart.hopto.org/sabgadget/
Post Reply