summaryrefslogtreecommitdiff
path: root/service/pixelated/runserver.py
diff options
context:
space:
mode:
Diffstat (limited to 'service/pixelated/runserver.py')
-rw-r--r--service/pixelated/runserver.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/service/pixelated/runserver.py b/service/pixelated/runserver.py
index 518ea5fb..5f30913b 100644
--- a/service/pixelated/runserver.py
+++ b/service/pixelated/runserver.py
@@ -52,6 +52,11 @@ def setup():
app.config['LEAP_SERVER_NAME'] = config['leap_provider_hostname']
app.config['LEAP_USERNAME'] = config['user']
app.config['LEAP_PASSWORD'] = config['password']
+ elif args.dispatcher_stdin:
+ config = fetch_credentials_from_dispatcher_stdin()
+ app.config['LEAP_SERVER_NAME'] = config['leap_provider_hostname']
+ app.config['LEAP_USERNAME'] = config['user']
+ app.config['LEAP_PASSWORD'] = config['password']
else:
configuration_setup(args.config)
start_services(args.host, args.port)
@@ -72,6 +77,10 @@ def fetch_credentials_from_dispatcher(filename):
return json.loads(fifo.read())
+def fetch_credentials_from_dispatcher_stdin():
+ return json.loads(sys.stdin.read())
+
+
def setup_debugger(enabled):
debug_enabled = enabled or os.environ.get('DEBUG', False)
log.startLogging(sys.stdout)