|
|
@ -86,6 +86,12 @@ class ScriptForm: |
|
|
|
users = config['users'] |
|
|
|
users = config['users'] |
|
|
|
for form in config['forms']: |
|
|
|
for form in config['forms']: |
|
|
|
form_name = form['name'] |
|
|
|
form_name = form['name'] |
|
|
|
|
|
|
|
if not form['script'].startswith('/'): |
|
|
|
|
|
|
|
# Script is relative to the current dir |
|
|
|
|
|
|
|
script = os.path.join(os.path.realpath(os.curdir), |
|
|
|
|
|
|
|
form['script']) |
|
|
|
|
|
|
|
else: |
|
|
|
|
|
|
|
# Absolute path to the script |
|
|
|
script = form['script'] |
|
|
|
script = form['script'] |
|
|
|
forms.append( |
|
|
|
forms.append( |
|
|
|
FormDefinition(form_name, |
|
|
|
FormDefinition(form_name, |
|
|
@ -124,6 +130,10 @@ class ScriptForm: |
|
|
|
self.running = False |
|
|
|
self.running = False |
|
|
|
|
|
|
|
|
|
|
|
def shutdown(self): |
|
|
|
def shutdown(self): |
|
|
|
|
|
|
|
""" |
|
|
|
|
|
|
|
Shutdown the server. This interupts the run() method and must thus be |
|
|
|
|
|
|
|
run in a seperate thread. |
|
|
|
|
|
|
|
""" |
|
|
|
self.log.info("Attempting server shutdown") |
|
|
|
self.log.info("Attempting server shutdown") |
|
|
|
|
|
|
|
|
|
|
|
def t_shutdown(sf): |
|
|
|
def t_shutdown(sf): |
|
|
|