blob: 5b1e0deef45e2e5bd0860739af1b8ecb7a5de03b (
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
31
32
33
34
35
36
37
|
#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: ntop
# REQUIRE: DAEMON
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf to enable ntop:
#
# ntop_enable (bool): Set it to "YES" to enable ntop
# Default is "NO".
# ntop_flags (flags): Set extra flags to ntop
# Default is "-d --use-syslog=daemon". see ntop(8).
#
. %%RC_SUBR%%
name=ntop
rcvar=${name}_enable
load_rc_config $name
: ${ntop_enable="NO"}
: ${ntop_flags="-d --use-syslog=daemon"}
command=%%PREFIX%%/bin/ntop
start_precmd="${name}_checkpw"
ntop_checkpw()
{
if [ ! -f %%DBDIR%%/ntop/ntop_pw.db ]; then
err 1 "Please set admin password for ntop. Run '%%PREFIX%%/bin/ntop -u nobody -A'"
fi
}
run_rc_command "$1"
|