#!/bin/bash ########################################## # # Variables - you may edit these RECIPIENT=security@mycompany.com TMPFILESTUB=/home/username/tmp/check-bigip-config.`/bin/hostname | cut -f1 -d'.'` ########################################## # # Don't edit below this line OLD=$TMPFILESTUB.old NEW=$TMPFILESTUB.new DIFF=$TMPFILESTUB.diff cp -a $NEW $OLD cp -a /config/bigip.conf $NEW #diff -C5 $OLD $NEW | grep -v @@ | tail -n +3 > $DIFF diff -U0 $OLD $NEW | grep -v @@ | tail -n +3 > $DIFF if [[ -s $DIFF ]] ; then #echo -e "Debug:\\n\\r`cat $DIFF`" mail -s "F5 bigip.conf changes" $RECIPIENT < $DIFF rm $DIFF fi ;