diff --git a/install.sh b/install.sh index 09c60bc..b34df0c 100644 --- a/install.sh +++ b/install.sh @@ -123,7 +123,12 @@ cp -a fail2ban/* /etc/fail2ban/ echo "destemail = $WEBMASTER" >> /etc/fail2ban/jail.local echo "bantime = 24h" >> /etc/fail2ban/jail.d/defaults-debian.conf echo "maxretry = 3" >> /etc/fail2ban/jail.d/defaults-debian.conf -echo "logpath = /var/log/auth.log tail" >> /etc/fail2ban/jail.d/defaults-debian.conf +if [ $os_codename = jammy ]; then + echo "backend = auto" >> /etc/fail2ban/jail.d/defaults-debian.conf + echo "logpath = /var/log/auth.log tail" >> /etc/fail2ban/jail.d/defaults-debian.conf +elif [ $os_codename = bookworm ]; then + echo "backend = systemd" >> /etc/fail2ban/jail.d/defaults-debian.conf +fi systemctl enable fail2ban systemctl start fail2ban