summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/cli
diff options
context:
space:
mode:
Diffstat (limited to 'src/leap/bitmask/cli')
-rw-r--r--src/leap/bitmask/cli/command.py6
-rw-r--r--src/leap/bitmask/cli/eip.py14
2 files changed, 14 insertions, 6 deletions
diff --git a/src/leap/bitmask/cli/command.py b/src/leap/bitmask/cli/command.py
index 0e70d2e7..ff213a35 100644
--- a/src/leap/bitmask/cli/command.py
+++ b/src/leap/bitmask/cli/command.py
@@ -116,7 +116,11 @@ class Command(object):
if self.print_json:
print(json.dumps(obj, indent=2))
elif not obj['error']:
- return printer(obj['result'])
+ if not obj['result']:
+ print (Fore.RED + 'ERROR: malformed response, expected'
+ ' obj["result"]' + Fore.RESET)
+ else:
+ return printer(obj['result'])
else:
print Fore.RED + 'ERROR:' + '%s' % obj['error'] + Fore.RESET
diff --git a/src/leap/bitmask/cli/eip.py b/src/leap/bitmask/cli/eip.py
index eac8682a..5fb240cd 100644
--- a/src/leap/bitmask/cli/eip.py
+++ b/src/leap/bitmask/cli/eip.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# eip
-# Copyright (C) 2016 LEAP
+# Copyright (C) 2016-2017 LEAP
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -24,14 +24,18 @@ class Eip(command.Command):
service = 'eip'
usage = '''{name} eip <subcommand>
-Bitmask Encrypted Internet Service
+Bitmask Encrypted Internet Proxy Service
SUBCOMMANDS:
- start Start service
- stop Stop service
+ enable Enable EIP Service
+ disable Disable EIP Service
+ check Check whether EIP service is properly configured
+ get_cert Get EIP Certificate from provider
+ start Start EIP
+ stop Stop EIP
status Display status about service
'''.format(name=command.appname)
- commands = ['start', 'stop', 'status']
+ commands = ['start', 'stop', 'status', 'check', 'get_cert']