diff options
author | mnag <mnag@FreeBSD.org> | 2006-03-23 03:25:52 +0800 |
---|---|---|
committer | mnag <mnag@FreeBSD.org> | 2006-03-23 03:25:52 +0800 |
commit | dcaa324c6094914729575fad9179040e193155ea (patch) | |
tree | db411bd429ee420d3002914f9621e4402ab34036 /net/ntop/files | |
parent | 3bdf6c760acbbf613e49f42b6122735982e52b4c (diff) | |
download | freebsd-ports-gnome-dcaa324c6094914729575fad9179040e193155ea.tar.gz freebsd-ports-gnome-dcaa324c6094914729575fad9179040e193155ea.tar.zst freebsd-ports-gnome-dcaa324c6094914729575fad9179040e193155ea.zip |
- 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]
Diffstat (limited to 'net/ntop/files')
-rw-r--r-- | net/ntop/files/ntop.sh.in | 26 | ||||
-rw-r--r-- | net/ntop/files/pkg-deinstall.in | 23 |
2 files changed, 40 insertions, 9 deletions
diff --git a/net/ntop/files/ntop.sh.in b/net/ntop/files/ntop.sh.in index f2b1fee571ed..5b1e0deef45e 100644 --- a/net/ntop/files/ntop.sh.in +++ b/net/ntop/files/ntop.sh.in @@ -2,28 +2,36 @@ # # $FreeBSD$ # - # PROVIDE: ntop # REQUIRE: DAEMON # KEYWORD: shutdown - # # Add the following lines to /etc/rc.conf to enable ntop: # -#ntop_enable="YES" -# -# See ntop(8) for flags +# 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=`set_rcvar` +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_enable=${ntop_enable:-"NO"} -ntop_flags=${ntop_flags:-"-d --use-syslog=daemon"} +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 +} -load_rc_config $name run_rc_command "$1" diff --git a/net/ntop/files/pkg-deinstall.in b/net/ntop/files/pkg-deinstall.in new file mode 100644 index 000000000000..2e0d9914e1da --- /dev/null +++ b/net/ntop/files/pkg-deinstall.in @@ -0,0 +1,23 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +case $2 in + DEINSTALL) + ;; + POST-DEINSTALL) + echo "===> post-deinstallation information for $1" + echo "" + echo " Please note that ntop was not completely removed" + echo " from this system:" + echo "" + echo " %%DBDIR%%/ntop can be removed if this port will not be" + echo " reinstalled." + echo "" + ;; + *) + exit 64 + ;; +esac +exit 0 |