summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/cli
diff options
context:
space:
mode:
authorKali Kaneko (leap communications) <kali@leap.se>2016-09-06 22:22:07 -0400
committerKali Kaneko (leap communications) <kali@leap.se>2016-09-06 23:00:57 -0400
commit5a3fb4eb5a24e250a75dac4a2a39ce5632a175b6 (patch)
tree2731d5daf3cb50985b21ecf258c8ecf193945471 /src/leap/bitmask/cli
parente60b252247247e812bc8b9ae5726150cbd96d923 (diff)
[feat] add webui command: enable/disable/status
Diffstat (limited to 'src/leap/bitmask/cli')
-rwxr-xr-xsrc/leap/bitmask/cli/bitmask_cli.py6
-rw-r--r--src/leap/bitmask/cli/webui.py39
2 files changed, 45 insertions, 0 deletions
diff --git a/src/leap/bitmask/cli/bitmask_cli.py b/src/leap/bitmask/cli/bitmask_cli.py
index 1f104c9c..3fa134a6 100755
--- a/src/leap/bitmask/cli/bitmask_cli.py
+++ b/src/leap/bitmask/cli/bitmask_cli.py
@@ -27,6 +27,7 @@ from twisted.internet import reactor, defer
from leap.bitmask.cli.eip import Eip
from leap.bitmask.cli.keys import Keys
from leap.bitmask.cli.mail import Mail
+from leap.bitmask.cli.webui import WebUI
from leap.bitmask.cli import command
from leap.bitmask.cli.user import User
@@ -42,6 +43,7 @@ SERVICE COMMANDS:
mail Bitmask Encrypted Mail
eip Encrypted Internet Proxy
keys Bitmask Keymanager
+ webui Bitmask Web User Interface
GENERAL COMMANDS:
@@ -73,6 +75,10 @@ GENERAL COMMANDS:
keys = Keys()
return keys.execute(raw_args)
+ def webui(self, raw_args):
+ webui = WebUI()
+ return webui.execute(raw_args)
+
# Single commands
def launch(self, raw_args):
diff --git a/src/leap/bitmask/cli/webui.py b/src/leap/bitmask/cli/webui.py
new file mode 100644
index 00000000..d4d5f782
--- /dev/null
+++ b/src/leap/bitmask/cli/webui.py
@@ -0,0 +1,39 @@
+# -*- coding: utf-8 -*-
+# webui.py
+# Copyright (C) 2016 LEAP Encryption Access Project
+#
+# 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
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+"""
+Bitmask Command Line interface: webui
+"""
+
+from leap.bitmask.cli import command
+
+
+class WebUI(command.Command):
+ service = 'webui'
+ usage = '''{name} webui <subcommand>
+
+Bitmask Web User Interface
+
+SUBCOMMANDS:
+
+ enable Start service
+ disable Stop service
+ status Display status about service
+
+'''.format(name=command.appname)
+
+ commands = ['enable', 'disable', 'status']