summaryrefslogtreecommitdiff
path: root/net-mgmt/fastnetmon/files/fastnetmon.in
blob: 431a3479341299652458198d898e114a0728a420 (plain) (blame)
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
#!/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"