Commit 672e682c authored by Vitaly Lipatov's avatar Vitaly Lipatov

fail2ban test: fix script

parent d33e5822
......@@ -10,9 +10,12 @@ test -d filter.d || cd /etc/fail2ban || fatal "Can't find fail2ban config"
test -d test.d || fatal "Can't find test.d in $(pwd)."
which fail2ban-regex >/dev/null || fatal
for i in test.d/* ; do
TEST="*"
[ -n "$1" ] && TEST="$1"
for i in test.d/$TEST ; do
FILTERNAME=$(basename $i)
FILTER=filter.d/$FILTERNAME.conf
FILTER=$(pwd)/filter.d/$FILTERNAME.conf
test -r "$FILTER" || exit
echo
echo "Testing filter $FILTER with data..."
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment