summaryrefslogtreecommitdiff
blob: 575f01912c06264ab4c0c20591af35d5e6f09e01 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/sbin/runscript
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

FENG="/usr/bin/feng"
PIDFILE="/var/run/feng.pid"

depend() {
    use net dns
}

start() {
    ebegin "Starting feng"
    echo start-stop-daemon --start -b -m -p ${PIDFILE} -x ${FENG} -- ${FENG_OPTS}
    start-stop-daemon --start --quiet --background \
                      --make-pidfile \
                      --pidfile ${PIDFILE} \
                      --exec /usr/bin/feng \
                      --chuid feng:feng \
                      -- ${FENG_OPTS}
    eend $?
}

stop() {
    ebegin "Stopping feng"
    echo start-stop-daemon --stop -p ${PIDFILE}  
    start-stop-daemon --stop -p ${PIDFILE}  
    eend $?
}