From 7e05976ead14984a0c10d76f2e49713762479039 Mon Sep 17 00:00:00 2001 From: "Serg G. Brester" Date: Thu, 11 Jan 2018 12:38:34 +0100 Subject: [PATCH] action.d/hostsdeny.conf: actionunban rewritten using sed, also dots in IP were escaped now. Closes #2000 --- config/action.d/hostsdeny.conf | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/config/action.d/hostsdeny.conf b/config/action.d/hostsdeny.conf index d74f498d..5cca6529 100644 --- a/config/action.d/hostsdeny.conf +++ b/config/action.d/hostsdeny.conf @@ -31,8 +31,7 @@ actioncheck = # Tags: See jail.conf(5) man page # Values: CMD # -actionban = IP= && - printf %%b ": $IP\n" >> +actionban = IP= && printf %%b ": $IP\n" >> # Option: actionunban # Notes.: command executed when unbanning an IP. Take care that the @@ -40,7 +39,7 @@ actionban = IP= && # Tags: See jail.conf(5) man page # Values: CMD # -actionunban = echo "/^: $/
d
w
q" | ed +actionunban = IP=$(echo | sed 's/\./\\./g') && sed -i "/^: $IP$/d" [Init]