#!/bin/bash
##
# chkconfig: 345 55 25
# description: Advanced Policy Firewall
#

# source function library
. /etc/rc.d/init.d/functions
# import variables
. /etc/apf/conf.apf
. /etc/apf/internals/internals.conf

ipt="/sbin/iptables"
inspath="/etc/apf"
prog="apf"

case "$1" in
start)
        echo -n "Starting APF:"
        /usr/local/sbin/apf --start >> /dev/null 2>&1
        echo_success
        echo
        ;;
stop)
        echo -n "Stopping APF:"
        /usr/local/sbin/apf --stop >> /dev/null 2>&1
        echo_success
        echo
        ;;
restart)
        $0 stop
        $0 start
        ;;
*)
        echo "usage: $0 [start|stop|restart]"
esac
exit 0
