commit: 4dc117d84e726d600656284b510303cc521f3c99
Author: Louis Sautier <sautier.louis <AT> gmail <DOT> com>
AuthorDate: Wed Jan 6 00:36:32 2016 +0000
Commit: Patrice Clement <monsieurp <AT> gentoo <DOT> org>
CommitDate: Wed Jan 6 00:36:32 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4dc117d8
net-nntp/nzbget: improve init script #550600
Package-Manager: portage-2.2.26
net-nntp/nzbget/files/nzbget.initd | 25 ++++++++++---------------
1 file changed, 10 insertions(+), 15 deletions(-)
diff --git a/net-nntp/nzbget/files/nzbget.initd
b/net-nntp/nzbget/files/nzbget.initd
index 736e7a5..c533da1 100644
--- a/net-nntp/nzbget/files/nzbget.initd
+++ b/net-nntp/nzbget/files/nzbget.initd
@@ -3,11 +3,11 @@
# Distributed under the terms of the GNU General Public License v2
# $Id$
-extra_started_commands="pause unpause"
+extra_started_commands="reload"
start() {
- ebegin "Starting nzbget"
- checkpath -d -m 0755 -o "${NZBGET_USER}:${NZBGET_GROUP}" /run/nzbget
+ ebegin "Starting ${RC_SVCNAME}"
+ checkpath -d -m 0755 -o "${NZBGET_USER}":"${NZBGET_GROUP}" /run/nzbget
start-stop-daemon --quiet --start --user "${NZBGET_USER}" \
--group "${NZBGET_GROUP}" --exec /usr/bin/nzbget -- \
--configfile "${NZBGET_CONFIGFILE}" --daemon \
@@ -16,19 +16,14 @@ start() {
}
stop() {
- ebegin "Stopping nzbget"
- /usr/bin/nzbget --configfile "${NZBGET_CONFIGFILE}" --quit >/dev/null
- eend $?
-}
-
-pause() {
- ebegin "Pausing nzbget"
- /usr/bin/nzbget --configfile "${NZBGET_CONFIGFILE}" --pause >/dev/null
- eend $?
+ ebegin "Stopping ${RC_SVCNAME}"
+ start-stop-daemon --stop --exec /usr/bin/nzbget -- \
+ --configfile "${NZBGET_CONFIGFILE}" --daemon \
+ -- ${NZBGET_OPTS}
}
-unpause() {
- ebegin "Unpausing nzbget"
- /usr/bin/nzbget --configfile "${NZBGET_CONFIGFILE}" --unpause >/dev/null
+reload() {
+ ebegin "Reloading ${RC_SVCNAME}"
+ /usr/bin/nzbget --configfile "${NZBGET_CONFIGFILE}" --reload >/dev/null
eend $?
}