Fix fail2ban install without Nginx

This commit is contained in:
VirtuBox
2020-08-07 15:39:46 +02:00
parent dcb0b8f4f7
commit d30a5d7226
3 changed files with 24 additions and 8 deletions

View File

@@ -1042,7 +1042,8 @@ def post_pref(self, apt_packages, packages, upgrade=False):
WOGit.add(self, ["/etc/fail2ban"],
msg="Adding Fail2ban into Git")
Log.info(self, "Configuring Fail2Ban")
data = dict(release=WOVar.wo_version)
nginxf2b = bool(os.path.exists('/var/log/nginx'))
data = dict(release=WOVar.wo_version, nginx=nginxf2b)
WOTemplate.deploy(
self,
'/etc/fail2ban/jail.d/custom.conf',