do not cache IP on errors

This commit is contained in:
sceox 2020-11-18 16:20:23 -08:00
parent 17751c93f3
commit 323f926e53

View File

@ -10,8 +10,7 @@ tail -F $logf | while read line ; do
ip=`echo $line | awk '{print $1}'`
ip_regex=`echo $ip | sed 's/\./\\./g'`
if ! grep -q $ip_regex $cache; then
echo $ip >> $cache
/usr/local/bin/forumspam.sh "$ip"
/usr/local/bin/forumspam.sh "$ip" && echo $ip >> $cache
fi
esac
done