Well, apparently it's not possible.

"fail2ban-client reload" does everything (unban, re-ban, etc) for every jail, which is what I want to avoid.

"fail2ban-client reload $jail" does the same, except you would have to do it for every jail

Then I tried delaction / addaction on every jail with this beautiful ( :-) ) one-liner (broken up here to make it readable for the curious)  :

    fail2ban-client status \
    | perl -nle '/Jail list:\s+(.*)/ || next; @jails=split /, /, $1; print join("\n", @jails)' \
    | while read jail; do
        echo $jail
        fail2ban-client set $jail delaction sendmail-whois-lines;
        fail2ban-client set $jail addaction sendmail-whois-lines;
        echo;
      done

Unfortunately, that didn't work, even though "fail2ban-client -d" showed the new action in every jail. I just stopped getting mails until I did a full reload.

Maybe it should be a feature request for a future version...




-------- Original Message -------- (Tomasz Stankiewicz, 2019-07-01 22:48)



W dniu 2019-07-01 o 21:36, Dmitry Katsubo via Fail2ban-users pisze:
On 2019-07-01 19:57, MI wrote:
Is it possible to reload an action without restarting the whole service?

I modified my action.d/sendmail-whois-lines.local and would like to reload only that action.

This is fail2ban v. 0.9.6-2 on Debian 9.

Any ideas?

MI
Have you tried

# fail2ban-client reload

or

# systemctl reload fail2ban

?


This is what you need:

# fail2ban-client reload <jail-name>

Best regards.
Tom


_______________________________________________
Fail2ban-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fail2ban-users
_______________________________________________
Fail2ban-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fail2ban-users

Reply via email to