summaryrefslogtreecommitdiff
blob: 87032cd58364ee88c38faa1df7db8c67ebd076e9 (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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/sbin/runscript
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

PROGNAME=frox

opts="depend start stop reload"

depend() {
        need net
}

checkconfig() {
	if [ ! -f /etc/frox.conf ] ; then
		eerror "missing /etc/frox.conf"
		return 1
	fi

}

start() {
	checkconfig || return 1
	FROX_OPTS=" -f /etc/frox.conf"

        ebegin "Starting ${PROGNAME}..."
        start-stop-daemon --start --quiet --exec /usr/sbin/${PROGNAME} -- ${OPTIONS} ${FROX_OPTS} &> /dev/null
        eend $?
}

stop() {
        ebegin "Stop ${PROGNAME}..."
                start-stop-daemon --stop --quiet --exec /usr/sbin/${PROGNAME} &> /dev/null
        eend $?
}

reload() {
        if [ ! -f /var/run/frox/frox.pid ]; then
                eerror "frox isn't running"
                return 1
        fi
        ebegin "Reloading configuration"
        kill -HUP `cat /var/run/frox/frox.pid` &>/dev/null
        eend $?
}