Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 550600

Summary: net-nntp/nzbget improved init script
Product: Gentoo Linux Reporter: Louis Sautier (sbraz) <sbraz>
Component: Current packagesAssignee: Sven Wegener <swegener>
Status: RESOLVED FIXED    
Severity: normal CC: net-news, radhermit
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: improved init script

Description Louis Sautier (sbraz) gentoo-dev 2015-05-27 22:02:25 UTC
Created attachment 404114 [details]
improved init script

Hi, the current init script has a few issues :
- pause doesn't work either because it is an alias for stop
- restart does not work because stop sends a command to the daemon but does not ensure that it is actually stopped
- there is no reload action

Here is an improved script.
I removed pause/unpause because I am not sure that this is something that the init script is supposed to do. Feel free to re-add these if it seems necessary.
I changed the stop function to make it use start-stop-daemon as it works equally well: nzbget handles SIGTERM just like a --quit command. Source:
http://sourceforge.net/p/nzbget/code/HEAD/tree/trunk/daemon/main/StackTrace.cpp#l262
http://sourceforge.net/p/nzbget/code/HEAD/tree/trunk/daemon/remote/BinRpc.cpp#l390
I also added a reload function. It has no error handling since the client always returns 0.
Comment 1 Patrice Clement gentoo-dev 2016-01-06 21:06:24 UTC
PR https://github.com/gentoo/gentoo/pull/611 mentioned this bug and I took care of merging it. Closing it.