Annotation of embedaddon/ipguard/doc/ipguard.sh.sample, revision 1.1.1.1
1.1 misho 1: #! /bin/sh
2: ## $Id: ipguard.sh.sample,v 1.11 2010/07/12 03:46:52 sead Exp $
3:
4: PATH=/bin:/usr/bin
5:
6: iface=fxp0
7: daemon=ipguard
8: daemon_path=/usr/local/sbin
9: daemon_pid=/var/run/${daemon}_${iface}.pid
10: daemon_flags="-u 300 -xz"
11:
12: case $1 in
13: start)
14: if [ -x ${daemon_path}/$daemon ]; then
15: ${daemon_path}/$daemon $daemon_flags $iface
16: echo -n " $daemon"
17: fi
18: ;;
19: stop)
20: if [ -f $daemon_pid ]; then
21: kill `head -1 $daemon_pid`
22: echo -n " $daemon"
23: fi
24: ;;
25: restart)
26: $0 stop
27: sleep 1
28: $0 start
29: ;;
30: *)
31: echo "Usage: `basename $0` {start|stop|restart}" >&2
32: exit 64
33: ;;
34: esac
35:
36: exit 0
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>