diff options
author | Philip van der Hoeven <philip@vd-hoeven.nl> | 2014-12-31 19:02:45 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2014-12-31 19:02:45 +0700 |
commit | 9147c65e761cf724e07365776a67d2f1fe429bb5 (patch) | |
tree | fb906017b874f512e86c3314907ad5a0de9b2293 /network/sabnzbd/rc.sabnzbd | |
parent | d5784e5912b14ced947426152c08a2fbf2640c1a (diff) | |
download | slackbuilds-9147c65e761cf724e07365776a67d2f1fe429bb5.tar.gz |
network/sabnzbd: Added (Binary newsreader).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'network/sabnzbd/rc.sabnzbd')
-rw-r--r-- | network/sabnzbd/rc.sabnzbd | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/network/sabnzbd/rc.sabnzbd b/network/sabnzbd/rc.sabnzbd new file mode 100644 index 0000000000..a2a7c7e69e --- /dev/null +++ b/network/sabnzbd/rc.sabnzbd @@ -0,0 +1,22 @@ +#!/bin/bash + +SABNZBD_USER="sabnzbd" +SABNZBD_CONF="/etc/sabnzbd/sabnzbd.ini" + +PIDFILE="/var/run/sabnzbd/sabnzbd-8080.pid" + +case "$1" in + start) + if [[ -f $PIDFILE ]]; then + echo "Pidfile $PIDFILE already exists, is sabnzbd already running ?" + exit 1 + fi + su - $SABNZBD_USER -c "unset DISPLAY; python -OO /opt/sabnzbd/SABnzbd.py -f $SABNZBD_CONF -d --pid /var/run/sabnzbd" -s /bin/sh + ;; + stop) + kill $(cat $PIDFILE) + ;; + *) + echo "usage: $0 {start|stop}" +esac +exit 0 |