projects/aports·blob master · refs

28 lines · 598 B

1#!/sbin/openrc-run
2
3name="Netflow collector"
4description="NetFlow Сollector"
5command=/usr/sbin/flowd
6command_args="-g"
7command_background=yes
8pidfile=/run/flowd.pid
9required_files=/etc/flowd/flowd.conf
10extra_started_commands="reload reopen"
11description_reload="Reload configuration"
12description_reopen="Reopen log files"
13
14depend() {
15 need localmount net
16}
17
18reload() {
19 ebegin "Reloading ${name:-$RC_SVCNAME}"
20 start-stop-daemon --signal HUP --pidfile $pidfile
21 eend $?
22}
23
24reopen() {
25 ebegin "Reopening ${name:-$RC_SVCNAME} log files"
26 start-stop-daemon --signal USR1 --pidfile $pidfile
27 eend $?
28}