summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLouis Sautier <sautier.louis@gmail.com>2016-01-06 01:36:32 +0100
committerLouis Sautier <sautier.louis@gmail.com>2016-01-06 01:36:32 +0100
commit4dc117d84e726d600656284b510303cc521f3c99 (patch)
treee811ccaeab626ec0bdefa47e93967723156ef2d1
parentMerge remote-tracking branch 'remotes/sbraz/jaraco-collections-text' (diff)
downloadgentoo-4dc117d84e726d600656284b510303cc521f3c99.tar.gz
gentoo-4dc117d84e726d600656284b510303cc521f3c99.tar.bz2
gentoo-4dc117d84e726d600656284b510303cc521f3c99.zip
net-nntp/nzbget: improve init script #550600
Package-Manager: portage-2.2.26
-rw-r--r--net-nntp/nzbget/files/nzbget.initd25
1 files changed, 10 insertions, 15 deletions
diff --git a/net-nntp/nzbget/files/nzbget.initd b/net-nntp/nzbget/files/nzbget.initd
index 736e7a528b65..c533da1034ad 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 $?
}