mirror of
https://github.com/pavel-odintsov/fastnetmon
synced 2024-06-03 15:56:38 +02:00
c220afea84
Available on FreeBSD ports tree and can be installed via ports or pkg.
31 lines
631 B
Bash
31 lines
631 B
Bash
#!/bin/sh
|
|
|
|
# PROVIDE: fastnetmon
|
|
# REQUIRE: NETWORKING SERVERS LOGIN
|
|
# BEFORE: securelevel
|
|
# KEYWORD: shutdown
|
|
|
|
# Add the following line to /etc/rc.conf to enable 'fastnetmon':
|
|
#
|
|
# fastnetmon_enable="YES"
|
|
#
|
|
|
|
. /etc/rc.subr
|
|
|
|
name=fastnetmon
|
|
desc="fastnetmon startup script"
|
|
rcvar=fastnetmon_enable
|
|
|
|
load_rc_config "$name"
|
|
|
|
: ${fastnetmon_enable:=NO}
|
|
: ${fastnetmon_conf:=%%ETCDIR%%/$name.conf}
|
|
: ${fastnetmon_flags:=--daemonize}
|
|
: ${fastnetmon_user:=fastnetmon}
|
|
|
|
command=%%PREFIX%%/bin/fastnetmon
|
|
command_args="--configuration_file ${fastnetmon_conf} ${fastnetmon_flags}"
|
|
pidfile=/var/run/fastnetmon/$name.pid
|
|
|
|
run_rc_command "$1"
|