Lines 3-19
Link Here
|
3 |
# Distributed under the terms of the GNU General Public License v2 |
3 |
# Distributed under the terms of the GNU General Public License v2 |
4 |
# $Header: /var/cvsroot/gentoo-x86/net-nntp/sabnzbd/files/sabnzbd.initd,v 1.2 2013/01/06 19:44:49 jsbronder Exp $ |
4 |
# $Header: /var/cvsroot/gentoo-x86/net-nntp/sabnzbd/files/sabnzbd.initd,v 1.2 2013/01/06 19:44:49 jsbronder Exp $ |
5 |
|
5 |
|
|
|
6 |
rundir=/var/run/sabnzbd |
7 |
# pid file name is hard-coded in sabnzbd, this must match |
8 |
pidfile=$rundir/sabnzbd-${SABNZBD_PORT}.pid |
6 |
|
9 |
|
7 |
depend() { |
10 |
depend() { |
8 |
need net |
11 |
need net |
9 |
} |
12 |
} |
10 |
|
13 |
|
|
|
14 |
start_pre() { |
15 |
checkpath -q -d -o ${SABNZBD_USER}:${SABNZBD_GROUP} -m 0770 "${rundir}" |
16 |
} |
17 |
|
11 |
start() { |
18 |
start() { |
12 |
ebegin "Starting SABnzbd" |
19 |
ebegin "Starting SABnzbd" |
13 |
|
20 |
|
14 |
start-stop-daemon \ |
21 |
start-stop-daemon \ |
15 |
--quiet \ |
22 |
--quiet \ |
16 |
--start \ |
23 |
--start \ |
|
|
24 |
--pidfile ${pidfile} \ |
17 |
--user ${SABNZBD_USER} \ |
25 |
--user ${SABNZBD_USER} \ |
18 |
--group ${SABNZBD_GROUP} \ |
26 |
--group ${SABNZBD_GROUP} \ |
19 |
--name sabnzbd \ |
27 |
--name sabnzbd \ |
Lines 22-27
Link Here
|
22 |
--server ${SABNZBD_SERVER}:${SABNZBD_PORT} \ |
30 |
--server ${SABNZBD_SERVER}:${SABNZBD_PORT} \ |
23 |
--config-file ${SABNZBD_CONFIGFILE} \ |
31 |
--config-file ${SABNZBD_CONFIGFILE} \ |
24 |
--logging ${SABNZBD_LOGGING} \ |
32 |
--logging ${SABNZBD_LOGGING} \ |
|
|
33 |
--pid ${rundir}/ \ |
25 |
--daemon |
34 |
--daemon |
26 |
eend $? |
35 |
eend $? |
27 |
} |
36 |
} |