From 8e0fd306b7bd351f67c9a74032b1daed50d0d79f Mon Sep 17 00:00:00 2001 From: Casper Date: Tue, 7 Jun 2022 13:42:06 +0200 Subject: [PATCH] Check if fail2ban is running (#2626) --- target/bin/fail2ban | 2 ++ 1 file changed, 2 insertions(+) diff --git a/target/bin/fail2ban b/target/bin/fail2ban index d5f61a16..51286937 100755 --- a/target/bin/fail2ban +++ b/target/bin/fail2ban @@ -5,6 +5,8 @@ source /usr/local/bin/helpers/index.sh function __usage { echo "Usage: ./setup.sh fail2ban [ ]" ; } +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]?)'