summaryrefslogtreecommitdiff
blob: 2679e4853b51beec31c245fc4968de1aca81d91e (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
47
48
49
50
51
52
53
#!/sbin/runscript
#
# (c) 2003 Juan J. Prieto <jjptapia@eresmas.com>
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
# ===
#
# htbinit
# 
# A shell-script wrapper for HTB.INIT designed for
# use in the SysV-init system (/etc/init.d).
#
# usage: htbinit { start | stop | restart | reload | recreate | stats }
#

depend() {
	need net
}

start() {
	ebegin "Starting htbinit"
	/usr/sbin/htbinit start
	eend $?
}

stop() {
	ebegin "Stopping htbinit"
	/usr/sbin/htbinit stop
	eend $?
}

reload() {
	ebegin "Reloading htbinit"
	/usr/sbin/htbinit start invalidate
	eend $?
}

recreate() {
	ebegin "Recreating htbinit config files"
	/bin/rm -rf /etc/htbinit/*
	/usr/sbin/htb.sysconfig
	einfo "htbinit (QoS) ... recreated. Use \"reload\" to load the new configuration."
	eend $?
}

stats() {
	ebegin "Showing htbinit stats"
	/usr/sbin/htbinit stats
	eend $?
}