bundles/icinga2: fix stupid in check_spam_blocklist

This commit is contained in:
Franzi 2023-09-09 14:24:34 +02:00
parent e6e9e425fc
commit bf6ed289e1
Signed by: kunsi
GPG key ID: 12E3D2136B818350

View file

@ -50,7 +50,7 @@ def check_list(ip_list, blocklist, warn_ips):
dns_name
]).decode().splitlines()
for item in result:
if line.startswith(';;'):
if item.startswith(';;'):
msgs.append('{} - {}'.format(
blocklist,
item,
@ -61,7 +61,7 @@ def check_list(ip_list, blocklist, warn_ips):
blocklist,
item,
))
if (item in warn_ips or line.startswith(';;')) and returncode < 2:
if (item in warn_ips or item.startswith(';;')) and returncode < 2:
returncode = 1
else:
returncode = 2