blob: 729c2abd1496e62132b15bcc0168bbdb8fd07276 (
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
33
34
35
36
37
38
39
40
41
|
diff --git a/bihourly.sh b/bihourly.sh
index 33e54db..810bf80 100755
--- a/bihourly.sh
+++ b/bihourly.sh
@@ -3,11 +3,14 @@
#
# bihourly arpwatch job
#
-PATH=${PATH}:/usr/local/sbin
-export PATH
-#
-cd /usr/operator/arpwatch
#
+
+. /etc/conf.d/arpwatch
+
+ARPWATCH_REPORT_EMAIL=
+
+cd /usr/share/arpwatch
+
list="`cat list`"
cname="`cat cname`"
temp1=$(mktemp)
@@ -26,7 +29,7 @@ touch ${l}
alist=""
for r in ${list}; do \
- ./arpfetch ${r} ${cname} > ${r} 2> ${temp1}
+ arpfetch ${r} ${cname} > ${r} 2> ${temp1}
if [ -s ${temp1} ]; then
echo "arpfetch ${r} errors:"
xr=${d}/${r}.$$
@@ -44,7 +47,7 @@ arpsnmp -d ${alist} > ${temp1} 2>&1
sed -e '/arpsnmp: suppressed DECnet flip flop/d' ${temp1} > ${temp2}
if [ -s ${temp2} ]; then
mail -s "`hostname` arpwatch report" \
- arpwatch-reports@noname.lbl.gov < ${temp2}
+ $ARPWATCH_REPORT_EMAIL < ${temp2}
fi
rm -f ${temp1} ${temp2}
|