From 45687fdbe21587b4db275aae5a0310b5da36eff8 Mon Sep 17 00:00:00 2001 From: itetcu Date: Mon, 26 Jun 2006 22:00:01 +0000 Subject: - fix rc.d script to check if the daemon is started - and since we change so much of it also move it to files/netams - bump PORTREVISION PR: ports/99322 Submitted by: Vasiliy P. Melnik Approved by: maintainer --- net-mgmt/netams/Makefile | 3 ++- net-mgmt/netams/files/netams.in | 32 ++++++++++++++++++++++++++++++++ net-mgmt/netams/files/netams.sh.in | 37 ------------------------------------- 3 files changed, 34 insertions(+), 38 deletions(-) create mode 100644 net-mgmt/netams/files/netams.in delete mode 100644 net-mgmt/netams/files/netams.sh.in (limited to 'net-mgmt/netams') diff --git a/net-mgmt/netams/Makefile b/net-mgmt/netams/Makefile index 18e3661c6142..ec1787d965c7 100644 --- a/net-mgmt/netams/Makefile +++ b/net-mgmt/netams/Makefile @@ -7,6 +7,7 @@ PORTNAME= netams PORTVERSION= 3.3.5 +PORTREVISION= 1 CATEGORIES= net-mgmt MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} \ http://www.netams.com/files/ @@ -19,7 +20,7 @@ COMMENT= Network Traffic Accounting and Monitoring Software NO_PACKAGE= Depends on kernel USE_SUBMAKE= yes -USE_RC_SUBR= netams.sh +USE_RC_SUBR= netams MANCOMPRESSED= no SCRIPTS_ENV= WRKDIRPREFIX="${WRKDIRPREFIX}" \ diff --git a/net-mgmt/netams/files/netams.in b/net-mgmt/netams/files/netams.in new file mode 100644 index 000000000000..9f2f9614d90e --- /dev/null +++ b/net-mgmt/netams/files/netams.in @@ -0,0 +1,32 @@ +#!/bin/sh +# $FreeBSD$ +# +# PROVIDE: netams +# REQUIRE: NETWORKING +# KEYWORD: shutdown + +# Add the following line to /etc/rc.conf to enable netams +# +# netams_enable (bool): Set to "NO" by default. +# Set it to "YES" to enable netams. +# netams_config (str): Custom configuration file to be passed +# to netams. +# +# DO NOT CHANGE THESE DEFAULT VALUES HERE +# + +. %%RC_SUBR%% + +name="netams" +rcvar=`set_rcvar` + +load_rc_config $name + +:${netams_enable="NO"} +:${netams_config="/usr/local/etc/netams.cfg"} + +pidfile="/var/run/netams.pid" +command="/usr/local/libexec/netams" +command_args="-lf ${netams_config} > /dev/null &" + +run_rc_command "$1" diff --git a/net-mgmt/netams/files/netams.sh.in b/net-mgmt/netams/files/netams.sh.in deleted file mode 100644 index 8b7ea67b0d47..000000000000 --- a/net-mgmt/netams/files/netams.sh.in +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/sh -# $FreeBSD$ - -# PROVIDE: netams -# REQUIRE: NETWORKING -# KEYWORD: shutdown - -# Define these netams_* variables in one of these files: -# /etc/rc.conf -# /etc/rc.conf.local -# /etc/rc.conf.d/netams -# -# netams_enable (bool): Set to "NO" by default. -# Set it to "YES" to enable netams. -# netams_config (str): Custom configuration file to be passed -# to netams. -# -# DO NOT CHANGE THESE DEFAULT VALUES HERE -# -netams_enable=${netams_enable-"NO"} -netams_config=${netams_config-"%%PREFIX%%/etc/netams.cfg"} - -netams_pidfile="/var/run/netams.pid" - -. %%RC_SUBR%% - -name="netams" -rcvar=`set_rcvar` -command="%%PREFIX%%/libexec/netams" - -load_rc_config $name - -pidfile="${netams_pidfile}" - -start_cmd="echo \"Starting ${name}.\"; ${command} -ldf ${netams_config} > /dev/null" - -run_rc_command "$1" -- cgit