blob: bff9abeef761993e7ebe4d443b64ede2732b87fe (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
#!/sbin/runscript
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-analyzer/arpwatch/files/arpwatch.init,v 1.9 2006/09/08 10:44:00 pva Exp $
depend() {
need net
}
start() {
for IFACE in ${IFACES}
do
ebegin "Starting arpwatch on ${IFACE}"
DATAFILE=/var/lib/arpwatch/${IFACE}.dat
if [ ! -f ${DATAFILE} ]; then
touch ${DATAFILE}
fi
if [ -z ${ARPUSER} ]; then
setsid /usr/sbin/arpwatch -i $IFACE -f /var/lib/arpwatch/$IFACE.dat ${OPTIONS}
eend $?
else
setsid /usr/sbin/arpwatch -i $IFACE -u ${ARPUSER} -f /var/lib/arpwatch/$IFACE.dat ${OPTIONS}
eend $?
fi
done
}
stop() {
ebegin "Stopping arpwatch"
killall arpwatch > /dev/null
eend $?
}
|