summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSven Wegener <swegener@gentoo.org>2008-06-07 21:19:45 +0000
committerSven Wegener <swegener@gentoo.org>2008-06-07 21:19:45 +0000
commitb5b9887f7a1c1cc62853802554d8f18a6e90b59c (patch)
tree1102acfdcafccc5af70b3ff1708acc1ca1f3d3fc /net-nntp/nzbget/files
parentRemove unused inherits that were used to patch and re-autotools before. (diff)
downloadhistorical-b5b9887f7a1c1cc62853802554d8f18a6e90b59c.tar.gz
historical-b5b9887f7a1c1cc62853802554d8f18a6e90b59c.tar.bz2
historical-b5b9887f7a1c1cc62853802554d8f18a6e90b59c.zip
Add support for a system-wide nzbget daemon, bug #217359. Credit for the idea goes to Chris Carlin.
Package-Manager: portage-2.1.5.4
Diffstat (limited to 'net-nntp/nzbget/files')
-rw-r--r--net-nntp/nzbget/files/nzbget.confd15
-rw-r--r--net-nntp/nzbget/files/nzbget.initd37
2 files changed, 52 insertions, 0 deletions
diff --git a/net-nntp/nzbget/files/nzbget.confd b/net-nntp/nzbget/files/nzbget.confd
new file mode 100644
index 000000000000..ee8f38c1aefd
--- /dev/null
+++ b/net-nntp/nzbget/files/nzbget.confd
@@ -0,0 +1,15 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# /etc/conf.d/nzbget
+# Config file for nzbget init script
+
+# Which user to run nzbget as
+NZBGET_USER="nzbget"
+NZBGET_GROUP="nzbget"
+
+# Location of config file
+NZBGET_CONFIGFILE="/etc/nzbgetd.conf"
+
+# Other options
+NZBGET_OPTS=""
diff --git a/net-nntp/nzbget/files/nzbget.initd b/net-nntp/nzbget/files/nzbget.initd
new file mode 100644
index 000000000000..c174b81bc505
--- /dev/null
+++ b/net-nntp/nzbget/files/nzbget.initd
@@ -0,0 +1,37 @@
+#!/sbin/runscript
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-nntp/nzbget/files/nzbget.initd,v 1.1 2008/06/07 21:19:45 swegener Exp $
+
+opts="pause unpause"
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting nzbget"
+ start-stop-daemon --quiet --start --chuid "${NZBGET_USER}" \
+ --group "${NZBGET_GROUP}" --exec /usr/bin/nzbget -- \
+ --configfile "${NZBGET_CONFIGFILE}" --daemon \
+ ${NZBGET_OPTS}
+ eend $?
+}
+
+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 $?
+}
+
+unpause() {
+ ebegin "Unpausing nzbget"
+ /usr/bin/nzbget --configfile "${NZBGET_CONFIGFILE}" --unpause >/dev/null
+ eend $?
+}