summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/vpn/service.py
diff options
context:
space:
mode:
authorRuben Pollan <meskio@sindominio.net>2017-03-28 13:35:56 +0200
committerKali Kaneko (leap communications) <kali@leap.se>2017-04-03 15:41:19 +0200
commitef804c1fd5a8ae307aca70853c9224b63d14a731 (patch)
tree97e69bc1ca54b3dbb43e7215a15b2f5415f5dedd /src/leap/bitmask/vpn/service.py
parentb71f8be2993c887130a00390e46615c882de6655 (diff)
[feat] add a check for the installation of the helpers to the API
- Resolves: #8786
Diffstat (limited to 'src/leap/bitmask/vpn/service.py')
-rw-r--r--src/leap/bitmask/vpn/service.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/leap/bitmask/vpn/service.py b/src/leap/bitmask/vpn/service.py
index 17e20af..a7dce3d 100644
--- a/src/leap/bitmask/vpn/service.py
+++ b/src/leap/bitmask/vpn/service.py
@@ -27,7 +27,7 @@ from twisted.internet import defer
from leap.bitmask.hooks import HookableService
from leap.bitmask.vpn.vpn import VPNManager
from leap.bitmask.vpn._checks import is_service_ready, get_vpn_cert_path
-from leap.bitmask.vpn import privilege
+from leap.bitmask.vpn import privilege, helpers
from leap.common.config import get_path_prefix
from leap.common.files import check_and_fix_urw_only
@@ -97,10 +97,13 @@ class VPNService(HookableService):
return status
- def do_check(self, domain):
+ def do_check(self, domain=None):
"""Check whether the VPN Service is properly configured,
and can be started"""
- return {'vpn_ready': is_service_ready(domain)}
+ ret = {'installed': helpers.check()}
+ if domain:
+ ret['vpn_ready'] = is_service_ready(domain)
+ return ret
@defer.inlineCallbacks
def do_get_cert(self, username):