PostProcessing doesnt work?
Forum rules
Help us help you:
Help us help you:
- Are you using the latest stable version of SABnzbd? Downloads page.
- Tell us what system you run SABnzbd on.
- Adhere to the forum rules.
- Do you experience problems during downloading?
Check your connection in Status and Interface settings window.
Use Test Server in Config > Servers.
We will probably ask you to do a test using only basic settings. - Do you experience problems during repair or unpacking?
Enable +Debug logging in the Status and Interface settings window and share the relevant parts of the log here using [ code ] sections.
Re: PostProcessing doesnt work?
Yes that is right, the 'core' of the program resides in library.zip. The exe's are just front-ends to that file(sort of)
Re: PostProcessing doesnt work?
Someone else in the forum has an alternative way to start as service:
http://forums.sabnzbd.org/index.php?topic=284.0
If you cannot keep it running with anysrv, maybe this will work.
http://forums.sabnzbd.org/index.php?topic=284.0
If you cannot keep it running with anysrv, maybe this will work.
Re: PostProcessing doesnt work?
Thanks for the help. I'll try anything to get it to run as a service .
ANy idea what the signal 5 means?
ANy idea what the signal 5 means?
Re: PostProcessing doesnt work?
I found it: http://msdn2.microsoft.com/en-us/librar ... S.85).aspx
dwCtrlType
The type of control signal received by the handler. This parameter can be one of the following values.
Value Meaning
CTRL_C_EVENT
0
A CTRL+C signal was received, either from keyboard input or from a signal generated by the GenerateConsoleCtrlEvent function.
CTRL_BREAK_EVENT
1
A CTRL+BREAK signal was received, either from keyboard input or from a signal generated by GenerateConsoleCtrlEvent.
CTRL_CLOSE_EVENT
2
A signal that the system sends to all processes attached to a console when the user closes the console (either by clicking Close on the console window's window menu, or by clicking the End Task button command from Task Manager).
CTRL_LOGOFF_EVENT
5
A signal that the system sends to all console processes when a user is logging off. This signal does not indicate which user is logging off, so no assumptions can be made.
Note that this signal is received only by services. Interactive applications are terminated at logoff, so they are not present when the system sends this signal.
CTRL_SHUTDOWN_EVENT
6
A signal that the system sends when the system is shutting down. Interactive applications are not present by the time the system sends this signal, therefore it can be received only be services in this situation. Services also have their own notification mechanism for shutdown events. For more information, see Handler.
This signal can also be generated by an application using GenerateConsoleCtrlEvent.
dwCtrlType
The type of control signal received by the handler. This parameter can be one of the following values.
Value Meaning
CTRL_C_EVENT
0
A CTRL+C signal was received, either from keyboard input or from a signal generated by the GenerateConsoleCtrlEvent function.
CTRL_BREAK_EVENT
1
A CTRL+BREAK signal was received, either from keyboard input or from a signal generated by GenerateConsoleCtrlEvent.
CTRL_CLOSE_EVENT
2
A signal that the system sends to all processes attached to a console when the user closes the console (either by clicking Close on the console window's window menu, or by clicking the End Task button command from Task Manager).
CTRL_LOGOFF_EVENT
5
A signal that the system sends to all console processes when a user is logging off. This signal does not indicate which user is logging off, so no assumptions can be made.
Note that this signal is received only by services. Interactive applications are terminated at logoff, so they are not present when the system sends this signal.
CTRL_SHUTDOWN_EVENT
6
A signal that the system sends when the system is shutting down. Interactive applications are not present by the time the system sends this signal, therefore it can be received only be services in this situation. Services also have their own notification mechanism for shutdown events. For more information, see Handler.
This signal can also be generated by an application using GenerateConsoleCtrlEvent.
Re: PostProcessing doesnt work?
looking at the code
With ref http://aspn.activestate.com/ASPN/docs/A ... _meth.html it looks to me as if any signal caught will cause SABnzbd to quit?
An exception to "CTRL_LOGOFF_EVENT" 5 in case the -d switch is used should maybe be added?
(Im a complete py n00b so correct me if Im wrong )
Code: Select all
################################################################################
# Signal Handler #
################################################################################
def sig_handler(signum = None, frame = None):
if type(signum) != type(None):
logging.warning('[%s] Signal %s caught, saving and exiting...', __NAME__, signum)
try:
save_state()
finally:
os._exit(0)
Code: Select all
win32api.SetConsoleCtrlHandler(sabnzbd.sig_handler, True)
An exception to "CTRL_LOGOFF_EVENT" 5 in case the -d switch is used should maybe be added?
(Im a complete py n00b so correct me if Im wrong )
Last edited by Usenet on February 15th, 2008, 7:38 am, edited 1 time in total.
Re: PostProcessing doesnt work?
Thanks for the info. I simply never gave it a thought before.
Until we introduced a "windowed" version of SABnzbd, I never had a problem with run-as-service.
I still don't with SABnzbd-console.exe.
I'll pick up your suggestion about signal handling anyway, thanks.
Until we introduced a "windowed" version of SABnzbd, I never had a problem with run-as-service.
I still don't with SABnzbd-console.exe.
I'll pick up your suggestion about signal handling anyway, thanks.
Re: PostProcessing doesnt work?
Glad I can help
Just trying to figure out how to "compile" the source for win.. something with py2win.exe ...
Just trying to figure out how to "compile" the source for win.. something with py2win.exe ...
Re: PostProcessing doesnt work?
GREAT, now the service works!! Thanks for great work!
I have an addition to the "service" instructions on the wiki (and a few corrections but i skip em now..):
Create an 'AppParameters' value of type REG_SZ and specify the parameters for your app. For Example: AppParameters: REG_SZ: -d -f C:\bin\sabnzbd.ini
Doing this you can skip running startup scrips etc..
I have an addition to the "service" instructions on the wiki (and a few corrections but i skip em now..):
Create an 'AppParameters' value of type REG_SZ and specify the parameters for your app. For Example: AppParameters: REG_SZ: -d -f C:\bin\sabnzbd.ini
Doing this you can skip running startup scrips etc..
Re: PostProcessing doesnt work?
Great you updated the wiki.
PLease also change
to
to make it easier for first-timers
PLease also change
Code: Select all
instsrv "c:\Program Files\Windows Resource Kits\Tools\srvany.exe"
Code: Select all
instsrv SABnzbd "c:\Program Files\Windows Resource Kits\Tools\srvany.exe"
Re: PostProcessing doesnt work?
Thanks, page has been updated.
Re: PostProcessing doesnt work?
did a remake for my friends:
First download the Windows 2003 Resource kit from the Microsoft site and install it. Next, assuming that SABnzbd is installed in c:\bin\sabnzbd, do the following steps.
run in a cmd window:
run in a cmd window:
Content of install_service.reg, create a text file containing: (modify the path to match your setup.)
Set dependency, by running in a cmd.exe window:
Now go to start -> run -> compmgmt.msc . Set a suitable user account for the service "SABnzbd" by creating a user account under "local users and groups". Under "Services and Programs" Choose "Services" and right click for properties for the "SABnzbd" service and specify the user account to run the service. Make sure the service has the "automatic" start up option
Start the service
First download the Windows 2003 Resource kit from the Microsoft site and install it. Next, assuming that SABnzbd is installed in c:\bin\sabnzbd, do the following steps.
run in a cmd window:
Code: Select all
instsrv SABnzbd "c:\Program Files\Windows Resource Kits\Tools\srvany.exe"
Code: Select all
install_service.reg
Code: Select all
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SABnzbd\Parameters]
"AppDirectory"="d:\\bin\\SABnzbd"
"Application"="D:\\bin\\SABnzbd\\SABnzbd.exe"
"AppParameters"="-d -f d:\\MyWorkDir\\sabnzbd.ini"
Code: Select all
sc config SABnzbd depend= Tcpip
Start the service