From c1197dec5cf390662a9acc2eff77967630a01e54 Mon Sep 17 00:00:00 2001 From: Valentin CZERYBA Date: Fri, 3 Mar 2023 19:45:51 +0100 Subject: [PATCH] fix path iptables executable --- roles/deploy-web/files/blacklist.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/deploy-web/files/blacklist.sh b/roles/deploy-web/files/blacklist.sh index 25144b2..40e1f6a 100755 --- a/roles/deploy-web/files/blacklist.sh +++ b/roles/deploy-web/files/blacklist.sh @@ -5,7 +5,7 @@ HOST=($(cat /etc/sentinel/virtualhost)) BLACKLIST=/etc/sentinel/blacklist -chain_count=$(iptables -L BLACKLIST -n | wc -l) +chain_count=$(/usr/sbin/iptables -L BLACKLIST -n | wc -l) if [ ${chain_count} -eq 0 ]; then bash /usr/local/bin/sentinel/refill_blacklist.sh fi @@ -30,7 +30,7 @@ do cat /tmp/error_$i | grep ${j} >> ${MAIL} echo "" >> ${MAIL} echo ${j} >> ${BLACKLIST} - iptables -A BLACKLIST -s ${j} -j DROP + /usr/sbin/iptables -A BLACKLIST -s ${j} -j DROP done echo "IP dejà blacklisté : " >> ${MAIL} cat ${BLACKLIST} >> ${MAIL}