Commit efb83c62 authored by Ad Schellevis's avatar Ad Schellevis

(ipsec, vici) ignore socket connect issues and report back

parent 89cb9b3f
......@@ -29,9 +29,16 @@
list ipsec status, using vici interface
"""
import sys
import socket
import ujson
import vici
s = vici.Session()
try:
s = vici.Session()
except socket.error:
# cannot connect to session, strongswan not running?
print ('ipsec not active')
sys.exit(0)
result = dict()
# parse connections
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment