summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/vpn/service.py
diff options
context:
space:
mode:
authorKali Kaneko (leap communications) <kali@leap.se>2017-02-04 17:01:25 +0100
committerKali Kaneko (leap communications) <kali@leap.se>2017-02-23 00:40:37 +0100
commit701fe5ebc70fb49bb32e81e6d6605f27ad09925b (patch)
tree0763df29131f3abe4604fc3626f51ed4360b5ff1 /src/leap/bitmask/vpn/service.py
parent409a4c663ec3c0b4a394fcaa6d4b1c6b527f8522 (diff)
[feature] parse status
- simple status parsing - add separate firewall status - set status for abnormal termination
Diffstat (limited to 'src/leap/bitmask/vpn/service.py')
-rw-r--r--src/leap/bitmask/vpn/service.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/leap/bitmask/vpn/service.py b/src/leap/bitmask/vpn/service.py
index 3edae35..170c5af 100644
--- a/src/leap/bitmask/vpn/service.py
+++ b/src/leap/bitmask/vpn/service.py
@@ -45,6 +45,7 @@ class EIPService(HookableService):
super(EIPService, self).__init__()
self._started = False
+ self._eip = None
if basepath is None:
self._basepath = get_path_prefix()
@@ -74,8 +75,11 @@ class EIPService(HookableService):
return {'result': 'stopped'}
def do_status(self):
- # TODO -- get status from a dedicated STATUS CLASS
- return {'result': 'running'}
+ if self._eip:
+ status = self._eip.get_status()
+ else:
+ status = {'EIP': 'OFF'}
+ return status
def do_check(self):
"""Check whether the EIP Service is properly configured,
@@ -100,7 +104,7 @@ class EIPService(HookableService):
os.makedirs(cert_dir, mode=0700)
with open(cert_path, 'w') as outf:
outf.write(cert_str)
- check_and_fix_urw_only(cert_path)
+ heck_and_fix_urw_only(cert_path)
defer.returnValue({'get_cert': 'ok'})
def do_install(self):