remove if
This commit is contained in:
parent
8219583961
commit
2b63ec3527
@ -3,9 +3,7 @@ MAIL=/tmp/mail
|
|||||||
SERVER_LOG=/var/log/nginx
|
SERVER_LOG=/var/log/nginx
|
||||||
HOST=($(cat /etc/sentinel/virtualhost))
|
HOST=($(cat /etc/sentinel/virtualhost))
|
||||||
BLACKLIST=/etc/sentinel/blacklist
|
BLACKLIST=/etc/sentinel/blacklist
|
||||||
currently_blacklist=$(ps -ef | grep blacklist | grep bash |grep ${USER} | wc -l)
|
|
||||||
|
|
||||||
if [ ${currently_blacklist} -eq 2 ]; then
|
|
||||||
|
|
||||||
chain_count=$(iptables -L BLACKLIST -n | wc -l)
|
chain_count=$(iptables -L BLACKLIST -n | wc -l)
|
||||||
if [ ${chain_count} -eq 0 ]; then
|
if [ ${chain_count} -eq 0 ]; then
|
||||||
@ -39,4 +37,4 @@ if [ ${currently_blacklist} -eq 2 ]; then
|
|||||||
cat ${MAIL} |mail -s "Blacklist IP ${i}" valczebackup@gmail.com
|
cat ${MAIL} |mail -s "Blacklist IP ${i}" valczebackup@gmail.com
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
fi
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user