bundles/icinga2: fix stupid in check_spam_blocklist
This commit is contained in:
parent
e6e9e425fc
commit
bf6ed289e1
1 changed files with 2 additions and 2 deletions
|
@ -50,7 +50,7 @@ def check_list(ip_list, blocklist, warn_ips):
|
||||||
dns_name
|
dns_name
|
||||||
]).decode().splitlines()
|
]).decode().splitlines()
|
||||||
for item in result:
|
for item in result:
|
||||||
if line.startswith(';;'):
|
if item.startswith(';;'):
|
||||||
msgs.append('{} - {}'.format(
|
msgs.append('{} - {}'.format(
|
||||||
blocklist,
|
blocklist,
|
||||||
item,
|
item,
|
||||||
|
@ -61,7 +61,7 @@ def check_list(ip_list, blocklist, warn_ips):
|
||||||
blocklist,
|
blocklist,
|
||||||
item,
|
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
|
returncode = 1
|
||||||
else:
|
else:
|
||||||
returncode = 2
|
returncode = 2
|
||||||
|
|
Loading…
Reference in a new issue