fix blacklist script

This commit is contained in:
Valentin CZERYBA 2023-02-03 07:09:23 +01:00
parent 28fba64c55
commit 0ea6c30c9b

View File

@ -18,7 +18,7 @@ do
echo "Nouvelle IP blacklisté" > ${MAIL} echo "Nouvelle IP blacklisté" > ${MAIL}
cat /tmp/blacklist_400 /tmp/blacklist_404 |grep -f ${BLACKLIST} -v |sort |uniq >> ${MAIL} cat /tmp/blacklist_400 /tmp/blacklist_404 |grep -f ${BLACKLIST} -v |sort |uniq >> ${MAIL}
echo "IP dejà blacklisté : " >> ${MAIL} echo "IP dejà blacklisté : " >> ${MAIL}
cat /tmp/blacklist_400 /tmp/blacklist_404 |grep -f ${BLACKLIST} -v |sort |uniq >> /tmp/blacklist cat /tmp/blacklist_400 /tmp/blacklist_404 |grep -f ${BLACKLIST} -v |sort |uniq >> ${BLACKLIST}
cat ${BLACKLIST} >> ${MAIL} cat ${BLACKLIST} >> ${MAIL}
cat ${MAIL} |mail -s "Blacklist IP ${i}" valczebackup@gmail.com cat ${MAIL} |mail -s "Blacklist IP ${i}" valczebackup@gmail.com
fi fi