#! /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