Skip to content

Instantly share code, notes, and snippets.

@pivotalcommon
Created October 21, 2011 22:08
Show Gist options
  • Save pivotalcommon/1305104 to your computer and use it in GitHub Desktop.
Save pivotalcommon/1305104 to your computer and use it in GitHub Desktop.
Arpwatch bihourly.sh modifications; no emails, different paths
diff --git a/bihourly.sh b/bihourly.sh
index fd273a4..d7da573 100755
--- a/bihourly.sh
+++ b/bihourly.sh
@@ -6,7 +6,7 @@
PATH=${PATH}:/usr/local/sbin
export PATH
#
-cd /usr/operator/arpwatch
+cd /usr/local/arpwatch
#
list="`cat list`"
cname="`cat cname`"
@@ -44,22 +44,22 @@ 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}
+ cunnie+arpwatch@pivotallabs.com < ${temp2}
fi
rm -f ${temp1} ${temp2}
-d=/www/NETINFO/arpwatch
-
-f=arp.dat
-cp ${f} ${d}
-
-f=ethercodes.dat
-diff ethercodes.dat ${d} >>/dev/null 2>&1
-if [ $? -ne 0 ]; then
- echo Updating ${d}/${f}
- cp ${f} ${d}
-fi
-
+#d=/www/NETINFO/arpwatch
+#
+#f=arp.dat
+#cp ${f} ${d}
+#
+#f=ethercodes.dat
+#diff ethercodes.dat ${d} >>/dev/null 2>&1
+#if [ $? -ne 0 ]; then
+# echo Updating ${d}/${f}
+# cp ${f} ${d}
+#fi
+#
rm ${l}
-
+#
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment