1
0
mirror of https://github.com/docker-mailserver/docker-mailserver.git synced 2025-07-16 07:24:44 +02:00

Check if fail2ban is running (#2626)

This commit is contained in:
Casper
2022-06-07 13:42:06 +02:00
committed by GitHub
parent 72650d4dc3
commit 8e0fd306b7

View File

@ -5,6 +5,8 @@ source /usr/local/bin/helpers/index.sh
function __usage { echo "Usage: ./setup.sh fail2ban [<ban|unban> <IP>]" ; }
fail2ban-client ping &>/dev/null || _exit_with_error "Fail2ban not running"
unset JAILS
declare -a JAILS
IP_REGEXP='((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)'