From 5a3fb4eb5a24e250a75dac4a2a39ce5632a175b6 Mon Sep 17 00:00:00 2001 From: "Kali Kaneko (leap communications)" Date: Tue, 6 Sep 2016 22:22:07 -0400 Subject: [feat] add webui command: enable/disable/status --- src/leap/bitmask/cli/bitmask_cli.py | 6 ++++++ src/leap/bitmask/cli/webui.py | 39 +++++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 src/leap/bitmask/cli/webui.py (limited to 'src/leap/bitmask/cli') 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 . + +""" +Bitmask Command Line interface: webui +""" + +from leap.bitmask.cli import command + + +class WebUI(command.Command): + service = 'webui' + usage = '''{name} webui + +Bitmask Web User Interface + +SUBCOMMANDS: + + enable Start service + disable Stop service + status Display status about service + +'''.format(name=command.appname) + + commands = ['enable', 'disable', 'status'] -- cgit v1.2.3