Просмотр исходного кода

#2594 Enable f2b on boot for new installs (#2596)

Jaap Marcus 3 лет назад
Родитель
Сommit
1ff8a4e520
1 измененных файлов с 4 добавлено и 1 удалено
  1. 4 1
      install/hst-install-ubuntu.sh

+ 4 - 1
install/hst-install-ubuntu.sh

@@ -1833,8 +1833,11 @@ if [ "$fail2ban" = 'yes' ]; then
     if [ -f /etc/fail2ban/jail.d/defaults-debian.conf ]; then
     if [ -f /etc/fail2ban/jail.d/defaults-debian.conf ]; then
         rm -f /etc/fail2ban/jail.d/defaults-debian.conf
         rm -f /etc/fail2ban/jail.d/defaults-debian.conf
     fi
     fi
-
+  
     update-rc.d fail2ban defaults
     update-rc.d fail2ban defaults
+    # Ubuntu 22.04 doesn't start F2B by default on boot
+    update-rc.d fail2ban enable
+    
     systemctl start fail2ban >> $LOG
     systemctl start fail2ban >> $LOG
     check_result $? "fail2ban start failed"
     check_result $? "fail2ban start failed"
 fi
 fi