
#-----------------------------------------------------------------------
# Copyright (C) 2000-2001, Jean-Sebastien Morisset <jsmoriss@mvlan.net>
#-----------------------------------------------------------------------
# $Id: ip_accounting.sh,v 1.6 2001/10/17 23:21:57 jsmoriss Exp $
#-----------------------------------------------------------------------
#  $RCSfile: ip_accounting.sh,v $
#   $Author: jsmoriss $
# $Revision: 1.6 $
#     $Date: 2001/10/17 23:21:57 $
#   $Locker:  $ 
#     $Name:  $
#-----------------------------------------------------------------------
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by 
# the Free Software Foundation <http://www.gnu.org/copyleft/gpl.txt>.
# 
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License (LICENSE file in archive) for more details.
#
#-----------------------------------------------------------------------
# README
#-----------------------------------------------------------------------
#
# A bourne shell function used by rcf; a very secure, fast, and complete
# firewall for linux <http://jsmoriss.mvlan.net/linux/rcf.html>.
#
#-----------------------------------------------------------------------
# FUNCTION
#-----------------------------------------------------------------------

Ip_Accounting () {
	if [ -x ${IPAC_BINDIR}/ipacset ]
	then
		echo "Adding IP Accounting Chains..."
		if [ "$REFRESH_INTERFACES" ]
		then
			if [ "$TEST" ]
			then
				echo "	${IPAC_BINDIR}/ipacset --fix-chains 2>/dev/null" >>/dev/stderr
			else
				${IPAC_BINDIR}/ipacset --fix-chains 2>/dev/null
			fi
		else
			if [ "$TEST" ]
			then
				echo "	rm -f /tmp/ipacset.* >/dev/null 2>&1" >>/dev/stderr
				echo "	${IPAC_BINDIR}/ipacset 2>/dev/null" >>/dev/stderr
			else
				rm -f /tmp/ipacset.* >/dev/null 2>&1
				${IPAC_BINDIR}/ipacset 2>/dev/null
			fi
		fi
	fi
}

