summary refs log tree commit diff
path: root/docker/start.py
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2019-05-02 13:37:35 +0100
committerRichard van der Hoff <richard@matrix.org>2019-05-02 13:37:35 +0100
commit746773883438ccbb67ba307031afa96e883f43cb (patch)
treecabf8acccd29d969d267b26f8f53e8c33ce38b95 /docker/start.py
parentMerge branch 'erikj/ratelimit_3pid_invite' of github.com:matrix-org/synapse i... (diff)
parentAdd admin api for sending server_notices (#5121) (diff)
downloadsynapse-746773883438ccbb67ba307031afa96e883f43cb.tar.xz
Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixes
Diffstat (limited to 'docker/start.py')
-rwxr-xr-xdocker/start.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/docker/start.py b/docker/start.py

index 941d9996a8..2da555272a 100755 --- a/docker/start.py +++ b/docker/start.py
@@ -59,6 +59,18 @@ else: if not os.path.exists("/compiled"): os.mkdir("/compiled") config_path = "/compiled/homeserver.yaml" + + # Convert SYNAPSE_NO_TLS to boolean if exists + if "SYNAPSE_NO_TLS" in environ: + tlsanswerstring = str.lower(environ["SYNAPSE_NO_TLS"]) + if tlsanswerstring in ("true", "on", "1", "yes"): + environ["SYNAPSE_NO_TLS"] = True + else: + if tlsanswerstring in ("false", "off", "0", "no"): + environ["SYNAPSE_NO_TLS"] = False + else: + print("Environment variable \"SYNAPSE_NO_TLS\" found but value \"" + tlsanswerstring + "\" unrecognized; exiting.") + sys.exit(2) convert("/conf/homeserver.yaml", config_path, environ) convert("/conf/log.config", "/compiled/log.config", environ)