Explorar o código

fix fail2ban filters

George Baugh hai 1 ano
pai
achega
0c410b5d6a
Modificáronse 2 ficheiros con 2 adicións e 1 borrados
  1. 1 0
      Installer.mk
  2. 1 1
      fail2ban/tcms-jail.tmpl

+ 1 - 0
Installer.mk

@@ -74,6 +74,7 @@ reset-remove:
 fail2ban:
 	cp fail2ban/tcms-jail.tmpl fail2ban/tcms-jail.conf
 	sed -i 's#__LOGDIR__#$(shell pwd)#g' fail2ban/tcms-jail.conf
+	sed -i 's#__DOMAIN__#$(shell bin/tcms-hostname)#g' fail2ban/tcms-jail.conf
 	sudo rm /etc/fail2ban/jail.d/$(shell bin/tcms-hostname).conf; /bin/true
 	sudo rm /etc/fail2ban/filter.d/$(shell bin/tcms-hostname).conf; /bin/true
 	sudo ln -sr fail2ban/tcms-jail.conf   /etc/fail2ban/jail.d/$(shell bin/tcms-hostname).conf

+ 1 - 1
fail2ban/tcms-jail.tmpl

@@ -1,4 +1,4 @@
-[tcms]
+[__DOMAIN__]
 enabled = true
 port = http,https
 filter = tcms