Fix Fail2ban recidive jail logpath and re-enable on openSUSE

This commit is contained in:
Mărcziem ™
2025-10-06 11:44:06 +02:00
parent fc26c8e839
commit 3344620824
2 changed files with 6 additions and 7 deletions

View File

@@ -31,9 +31,9 @@ install_fail2ban() {
;;
opensuse)
handle_error sudo zypper install -y fail2ban
# On openSUSE, Fail2ban has issues with systemd backend, skip it for now
log_warning "Fail2ban on openSUSE may have compatibility issues. Consider manual configuration."
return 0
# On openSUSE, create a basic log file for Fail2ban to monitor
sudo touch /var/log/fail2ban.log
sudo chmod 644 /var/log/fail2ban.log
;;
*)
log_error "Unsupported Linux distribution: $DISTRO"
@@ -129,6 +129,7 @@ enabled = false
[recidive]
enabled = true
logpath = /var/log/fail2ban.log
EOF
handle_error sudo systemctl enable fail2ban