From 6421e045b0cd7e3f74010fcc39907cfc91b62ae2 Mon Sep 17 00:00:00 2001 From: VirtuBox Date: Thu, 30 Jan 2020 15:37:56 +0100 Subject: [PATCH] another fail2ban fix --- wo/cli/plugins/stack_pref.py | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/wo/cli/plugins/stack_pref.py b/wo/cli/plugins/stack_pref.py index 77656c1..c242ea6 100644 --- a/wo/cli/plugins/stack_pref.py +++ b/wo/cli/plugins/stack_pref.py @@ -1023,22 +1023,21 @@ def post_pref(self, apt_packages, packages, upgrade=False): msg="Adding Fail2ban into Git") Log.info(self, "Configuring Fail2Ban") data = dict(release=WOVar.wo_version) - if WOAptGet.is_exec(self, 'nginx'): - WOTemplate.deploy( - self, - '/etc/fail2ban/jail.d/custom.conf', - 'fail2ban.mustache', - data, overwrite=False) - WOTemplate.deploy( - self, - '/etc/fail2ban/filter.d/wo-wordpress.conf', - 'fail2ban-wp.mustache', - data, overwrite=False) - WOTemplate.deploy( - self, - '/etc/fail2ban/filter.d/nginx-forbidden.conf', - 'fail2ban-forbidden.mustache', - data, overwrite=False) + WOTemplate.deploy( + self, + '/etc/fail2ban/jail.d/custom.conf', + 'fail2ban.mustache', + data, overwrite=False) + WOTemplate.deploy( + self, + '/etc/fail2ban/filter.d/wo-wordpress.conf', + 'fail2ban-wp.mustache', + data, overwrite=False) + WOTemplate.deploy( + self, + '/etc/fail2ban/filter.d/nginx-forbidden.conf', + 'fail2ban-forbidden.mustache', + data, overwrite=False) if not WOService.reload_service(self, 'fail2ban'): WOGit.rollback(