Verison 1.0.5

This commit is contained in:
OneFinityCNC
2020-10-15 23:17:21 -04:00
parent 24dfa6c64d
commit 47af000045
20 changed files with 1282 additions and 56 deletions

View File

@@ -80,6 +80,10 @@ class RebootHandler(bbctrl.APIHandler):
def put_ok(self):
self.get_ctrl().lcd.goodbye('Rebooting...')
subprocess.Popen('reboot')
class ShutdownHandler(bbctrl.APIHandler):
def put_ok(self):
subprocess.Popen(['shutdown','-h','now'])
class LogHandler(bbctrl.RequestHandler):
@@ -516,6 +520,7 @@ class Web(tornado.web.Application):
(r'/api/message/(\d+)/ack', MessageAckHandler),
(r'/api/bugreport', BugReportHandler),
(r'/api/reboot', RebootHandler),
(r'/api/shutdown', ShutdownHandler),
(r'/api/hostname', HostnameHandler),
(r'/api/wifi', WifiHandler),
(r'/api/remote/username', UsernameHandler),