projects/aports·blob master · refs

39 lines · 802 B

1--- a/bihourly.sh
2+++ b/bihourly.sh
3@@ -3,11 +3,13 @@
4 #
5 # bihourly arpwatch job
6 #
7-PATH=${PATH}:/usr/local/sbin
8-export PATH
9-#
10-cd /usr/local/arpwatch
11-#
12+
13+. /etc/conf.d/arpwatch
14+
15+ARPWATCH_REPORT_EMAIL=
16+
17+cd /usr/share/arpwatch
18+
19 list="`cat list`"
20 cname="`cat cname`"
21 temp1=/tmp/bihourly.1.$$
22@@ -26,7 +28,7 @@
23
24 alist=""
25 for r in ${list}; do \
26- ./arpfetch ${r} ${cname} > ${r} 2> ${temp1}
27+ arpfetch ${r} ${cname} > ${r} 2> ${temp1}
28 if [ -s ${temp1} ]; then
29 echo "arpfetch ${r} errors:"
30 xr=${d}/${r}.$$
31@@ -44,7 +46,7 @@
32 sed -e '/arpsnmp: suppressed DECnet flip flop/d' ${temp1} > ${temp2}
33 if [ -s ${temp2} ]; then
34 mail -s "`hostname` arpwatch report" \
35- [email protected] < ${temp2}
36+ $ARPWATCH_REPORT_EMAIL < ${temp2}
37 fi
38 rm -f ${temp1} ${temp2}
39