Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 550600 - net-nntp/nzbget improved init script
Summary: net-nntp/nzbget improved init script
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Sven Wegener
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-27 22:02 UTC by Louis Sautier (sbraz)
Modified: 2016-01-06 21:06 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
improved init script (nzbget,874 bytes, text/plain)
2015-05-27 22:02 UTC, Louis Sautier (sbraz)
Details

Note You need to log in before you can comment on or make changes to this bug.
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.