1
0
mirror of https://github.com/librenms/librenms-agent.git synced 2024-05-09 09:54:52 +00:00

don't assume it appends the jail name

This commit is contained in:
VVelox
2017-02-17 10:33:02 -06:00
committed by GitHub
parent 8b78f863d3
commit 6955e5d410

View File

@ -9,8 +9,8 @@ if [ `uname` = "FreeBSD" ]; then
/sbin/pfctl -t fail2ban -T show | /usr/bin/grep -c . /sbin/pfctl -t fail2ban -T show | /usr/bin/grep -c .
fi fi
if [ `uname` = "Linux" ]; then if [ `uname` = "Linux" ]; then
f2b1=`iptables -L -n | grep -c f2b\-` f2b1=`iptables -L -n | grep -c f2b\`
f2b2=`iptables -L -n | grep -c fail2ban\-` f2b2=`iptables -L -n | grep -c fail2ban\`
expr $f2b1 + $f2b2 expr $f2b1 + $f2b2
fi fi