summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--net-nntp/sabnzbd/Manifest2
-rw-r--r--net-nntp/sabnzbd/files/sabnzbd.conf22
-rw-r--r--net-nntp/sabnzbd/files/sabnzbd.init22
3 files changed, 46 insertions, 0 deletions
diff --git a/net-nntp/sabnzbd/Manifest b/net-nntp/sabnzbd/Manifest
index 8c86851..ce24476 100644
--- a/net-nntp/sabnzbd/Manifest
+++ b/net-nntp/sabnzbd/Manifest
@@ -1,4 +1,6 @@
+AUX sabnzbd.conf 723 RMD160 704a24d899970fb3051285a8f8dd650bb1584f48 SHA1 62c9b924debefe6111592f4e9d1620f4933b414d SHA256 b0eda99cdf1dc12d2818f3eb131a447cf054ace8bf921f90f9e28fbd01523bae
AUX sabnzbd.ini 2415 RMD160 eec1fbb240c3e1b904d3757da7a2f6e60acad157 SHA1 82ccfd2689042a33ed2d26c587489e98ffeddd3c SHA256 e05345c728bb2285caaf8feec264aaef3adaf903c4fd1879d3222fd5a7ae304a
+AUX sabnzbd.init 509 RMD160 84fe7ab74e15eca5e630f05b60f9650a1faeaacc SHA1 b2568a3fea569017428c3e3a9852e1151db9f550 SHA256 92024dc4a466c6ef10e6ccec2c98f5d038d496ebd4d07222d1492d640d1c6113
DIST SABnzbd-0.6.1-src.tar.gz 1888233 RMD160 0ac6823c2b850d4184b94f6a206241bcab04af1e SHA1 6e009f210235bb6b8278c59634bf2db1b5fb32f4 SHA256 b9b7e15c3e774aae42e248f19bc97bdbc17afe6bf27e236a7d565ddf5e11ae58
EBUILD sabnzbd-0.6.1.ebuild 3704 RMD160 091f2842dfa9d73216f429d19f864337b3a6c4e6 SHA1 e7080b0b5fe37e8c5915c5d29a24e6d040afe907 SHA256 1983ead04f5da44acd882845de2b513b6f2cf5796a86b5f69bf1d35894483d9a
MISC ChangeLog 252 RMD160 37a18861a1739a133fa07f2cf89be3bf067c88d3 SHA1 1d39f9e535afcdc498cfe06da872bf37d67a134b SHA256 ee66b4dfcec39dc60c0ac5f155b2d2be1b5f268209c5f78407488f8c798e52ec
diff --git a/net-nntp/sabnzbd/files/sabnzbd.conf b/net-nntp/sabnzbd/files/sabnzbd.conf
new file mode 100644
index 0000000..311c675
--- /dev/null
+++ b/net-nntp/sabnzbd/files/sabnzbd.conf
@@ -0,0 +1,22 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+# /etc/conf.d/sabnzbd
+# Config file for sabnzbd init script
+
+# Which user to run sabnzbd as, you should change this.
+SAB_USER="sabnzbd"
+
+# This overrides the contents of /etc/sabnzbd.conf, needed for wget shutdown to work in init (short of writing some crazy regex for the config)
+SAB_HOSTNAME="localhost"
+SAB_PORT="8081"
+
+# Location of config file.
+# Make sure the user specified above can read this file. (if you want to change options from the webUI, give it write)
+SAB_CFG="/etc/sabnzbd/sabnzbd.ini"
+
+SAB_PATH=/usr/share/sabnzbd/
+SAB_PY=SABnzbd.py
+
+SAB_PID=/var/run/sabnzbd/sabnzbd-${SAB_PORT}.pid
diff --git a/net-nntp/sabnzbd/files/sabnzbd.init b/net-nntp/sabnzbd/files/sabnzbd.init
new file mode 100644
index 0000000..811993a
--- /dev/null
+++ b/net-nntp/sabnzbd/files/sabnzbd.init
@@ -0,0 +1,22 @@
+#!/sbin/runscript
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+opts="start stop"
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting SABnzbd"
+ start-stop-daemon --start --quiet --user "${SAB_USER}" --pidfile "${SAB_PID}" -d "${SAB_PATH}" --exec python "${SAB_PY}" -- -d -f "${SAB_CFG}" --pid /var/run/sabnzbd/
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping SABnzbd"
+ start-stop-daemon --stop --retry 30 --pidfile "${SAB_PID}"
+ eend $?
+}