1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-27 05:10:36 +00:00
freebsd-ports/net/ntop/files/ntop.sh.in
Marcus Alves Grando fcd16abf29 - Add libxml2 dependency [1]
- Bump PORTREVISION [1]
- Remove IS_INTERACTIVE and admin password creation from installation and put admin password check in rc.d script
- Add OPTIONS to install AS data [2]
- portlint(1)

PR:		94672 [1], 94809 [2]
Submitted by:	maintainer
Notified by:	Andy Wettstein [1]
2006-03-22 19:25:52 +00:00

38 lines
690 B
Bash

#!/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"