File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / ipguard / doc / ipguard.sh.sample
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Tue Feb 21 21:59:41 2012 UTC (12 years, 10 months ago) by misho
Branches: ipguard, MAIN
CVS tags: v1_04p3, v1_04p0, v1_04, HEAD
ipguard

#! /bin/sh
##  $Id: ipguard.sh.sample,v 1.1.1.1 2012/02/21 21:59:41 misho Exp $

PATH=/bin:/usr/bin

iface=fxp0
daemon=ipguard
daemon_path=/usr/local/sbin
daemon_pid=/var/run/${daemon}_${iface}.pid
daemon_flags="-u 300 -xz"

case $1 in
    start)
        if [ -x ${daemon_path}/$daemon ]; then
            ${daemon_path}/$daemon $daemon_flags $iface
            echo -n " $daemon"
        fi
        ;;
    stop)
        if [ -f $daemon_pid ]; then
            kill `head -1 $daemon_pid`
            echo -n " $daemon"
        fi
        ;;
    restart)
        $0 stop
        sleep 1
        $0 start
        ;;
    *)
        echo "Usage: `basename $0` {start|stop|restart}" >&2
        exit 64
        ;;
esac

exit 0

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>