aboutsummaryrefslogtreecommitdiffstats
path: root/testing/flowd/flowd.initd
blob: df124451e55dbc569d7e3a91631a4803d10f9c7d (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
#!/sbin/openrc-run

name="Netflow collector"
description="NetFlow Сollector"
command=/usr/sbin/flowd
command_args="-g"
command_background=yes
pidfile=/run/flowd.pid
required_files=/etc/flowd/flowd.conf
extra_started_commands="reload reopen"
description_reload="Reload configuration"
description_reopen="Reopen log files"

depend() {
	need localmount net
}

reload() {
	ebegin "Reloading ${name:-$RC_SVCNAME}"
	start-stop-daemon --signal HUP --pidfile $pidfile
	eend $?
}

reopen() {
	ebegin "Reopening ${name:-$RC_SVCNAME} log files"
	start-stop-daemon --signal USR1 --pidfile $pidfile
	eend $?
}