diff --git a/.gitignore b/.gitignore index 1fe03b2..3b237f0 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,5 @@ config.py config.json *.pyc *.swp -.log \ No newline at end of file +.log* +.lock diff --git a/config_page.py b/config_page.py index 42e4d4b..eaf6b39 100644 --- a/config_page.py +++ b/config_page.py @@ -39,6 +39,17 @@ def upload(self): json.dump(input_json, f, indent=2, separators=(',', ': ')) self.index() + @cherrypy.expose + def start(self): + with open(".lock", 'w') as f: + f.write("1") + self.index() + + @cherrypy.expose + def stop(self): + with open(".lock", 'w') as f: + f.write("0") + self.index() @cherrypy.expose def log(self): diff --git a/html/config.html b/html/config.html index 0aa3d0a..2517d27 100644 --- a/html/config.html +++ b/html/config.html @@ -2,6 +2,25 @@ +