diff options
author | Kali Kaneko (leap communications) <kali@leap.se> | 2016-09-06 22:22:07 -0400 |
---|---|---|
committer | Kali Kaneko (leap communications) <kali@leap.se> | 2016-09-06 23:00:57 -0400 |
commit | 5a3fb4eb5a24e250a75dac4a2a39ce5632a175b6 (patch) | |
tree | 2731d5daf3cb50985b21ecf258c8ecf193945471 /src/leap/bitmask/core/_web.py | |
parent | e60b252247247e812bc8b9ae5726150cbd96d923 (diff) |
[feat] add webui command: enable/disable/status
Diffstat (limited to 'src/leap/bitmask/core/_web.py')
-rw-r--r-- | src/leap/bitmask/core/_web.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/leap/bitmask/core/_web.py b/src/leap/bitmask/core/_web.py index 3f39e435..c597d18e 100644 --- a/src/leap/bitmask/core/_web.py +++ b/src/leap/bitmask/core/_web.py @@ -71,10 +71,17 @@ class HTTPDispatcherService(service.Service): # TODO use endpoints instead self.listener = reactor.listenTCP(self.port, site, interface='127.0.0.1') + self.running = True def stopService(self): self.site.stopFactory() self.listener.stopListening() + self.running = False + + def do_status(self): + status = 'running' if self.running else 'disabled' + return {'web': status} + class Api(Resource): |