mirror of
https://github.com/bashclub/check-opnsense.git
synced 2024-11-07 16:31:58 +01:00
Fix ipsec bug
This commit is contained in:
parent
69e91c6c58
commit
52ceb8d182
@ -905,6 +905,8 @@ class checkmk_checker(object):
|
|||||||
_phase2config = _ipsec_config.get("phase2")
|
_phase2config = _ipsec_config.get("phase2")
|
||||||
if type(_phase1config) != list:
|
if type(_phase1config) != list:
|
||||||
_phase1config = [_phase1config]
|
_phase1config = [_phase1config]
|
||||||
|
if type(_phase2config) != list:
|
||||||
|
_phase2config = [_phase2config]
|
||||||
_json_data = self._run_prog("/usr/local/opnsense/scripts/ipsec/list_status.py")
|
_json_data = self._run_prog("/usr/local/opnsense/scripts/ipsec/list_status.py")
|
||||||
if len(_json_data.strip()) > 20:
|
if len(_json_data.strip()) > 20:
|
||||||
_json_data = json.loads(_json_data)
|
_json_data = json.loads(_json_data)
|
||||||
@ -1702,8 +1704,6 @@ if __name__ == "__main__":
|
|||||||
|
|
||||||
if SYSHOOK_METHOD and any(_active_methods) == False:
|
if SYSHOOK_METHOD and any(_active_methods) == False:
|
||||||
setattr(args,SYSHOOK_METHOD[0],True)
|
setattr(args,SYSHOOK_METHOD[0],True)
|
||||||
#pprint(args.__dict__)
|
|
||||||
#pprint(_pid)
|
|
||||||
if args.start:
|
if args.start:
|
||||||
if _pid > 0:
|
if _pid > 0:
|
||||||
try:
|
try:
|
||||||
|
Loading…
Reference in New Issue
Block a user