summaryrefslogtreecommitdiff
blob: 94c6fa9fae80e56a6ec69cd9e443eef798ae367d (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
#!/sbin/openrc-run
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

depend() {
	need localmount
	after bootmisc
	before net
}

checkrules() {
	if [ ! -f ${FIREQOS_CONF} ]; then
		eerror "Not starting FireQOS. Create ${FIREQOS_CONF}"
		eerror "and fill it with some rules."
		eerror "man fireqos.conf for more info."
		return 1
	fi
}

start() {
	checkrules || return 1
	ebegin "Starting FireQOS"
		/usr/sbin/fireqos start ${FIREQOS_CONF} -- ${FIREQOS_EXTRA_ARGS} > /dev/null
	eend $? 
}

stop() {
	ebegin "Stopping FireQOS"
		/usr/sbin/fireqos stop > /dev/null
	eend $?
}

restart() {
        ebegin "Restarting FireQOS"
                svc_stop;
                svc_start;
        eend $?
}

status() {
	ebegin "Showing FireQOS status"
	/usr/sbin/fireqos status
	eend $?
}