diff options
Diffstat (limited to 'net-nntp/sabnzbd/files/sabnzbd.init')
-rw-r--r-- | net-nntp/sabnzbd/files/sabnzbd.init | 22 |
1 files changed, 22 insertions, 0 deletions
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 $? +} |