aboutsummaryrefslogtreecommitdiffstats
path: root/bash
diff options
context:
space:
mode:
authorGravatar Tom van der Lee <t0m.vd.l33@gmail.com>2015-07-24 09:00:14 +0000
committerGravatar Tom van der Lee <t0m.vd.l33@gmail.com>2015-07-24 09:00:14 +0000
commit556a8ecc39c311504de273b00deb28222e0890f3 (patch)
tree0bc47c1d6f4de2342094a84f86e7aba0207c5177 /bash
parent5c726723647d228b9ac94405b87035aaff88bf3e (diff)
downloaddotfiles-556a8ecc39c311504de273b00deb28222e0890f3.tar.gz
dotfiles-556a8ecc39c311504de273b00deb28222e0890f3.tar.bz2
dotfiles-556a8ecc39c311504de273b00deb28222e0890f3.zip
Added ban counter to showbanned
Diffstat (limited to 'bash')
-rw-r--r--bash/.bashrc9
1 files changed, 8 insertions, 1 deletions
diff --git a/bash/.bashrc b/bash/.bashrc
index 5e0625b..66a722c 100644
--- a/bash/.bashrc
+++ b/bash/.bashrc
@@ -86,7 +86,14 @@ if exists pfctl && exists sudo; then
86 { 86 {
87 for table in "fail2ban" "permaban"; do 87 for table in "fail2ban" "permaban"; do
88 banned=$(sudo pfctl -t $table -T show 2> /dev/null) 88 banned=$(sudo pfctl -t $table -T show 2> /dev/null)
89 echo -e "$table\n$banned" 89
90 if [ -z "$banned" ]; then
91 nrBanned="0"
92 else
93 nrBanned=$(echo "$banned" | wc -l | awk '{ print $1 }')
94 fi
95
96 echo -e "$table ($nrBanned)\n$banned"
90 done 97 done
91 } 98 }
92fi 99fi