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