1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-27 00:57:50 +00:00
freebsd-ports/net/ntop/files/ntop.in
Doug Barton 9aac569eaa Move the rc.d scripts of the form *.sh.in to *.in
Where necessary add $FreeBSD$ to the file

No PORTREVISION bump necessary because this is a no-op
2012-08-05 23:19:36 +00:00

38 lines
688 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).
#
. /etc/rc.subr
name=ntop
rcvar=ntop_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"