diff options
author | Richard van der Hoff <1389908+richvdh@users.noreply.github.com> | 2018-12-21 16:04:57 +0100 |
---|---|---|
committer | Amber Brown <hawkowl@atleastfornow.net> | 2018-12-22 02:04:57 +1100 |
commit | 9c2af7b2c51e31a1baf5ef523a251b946774468c (patch) | |
tree | 6c5fe1adda3c4728c36313de4fcfd53699ab2779 /synapse/config/server.py | |
parent | Fix indentation in default config (#4313) (diff) | |
download | synapse-9c2af7b2c51e31a1baf5ef523a251b946774468c.tar.xz |
Add a script to generate a clean config file (#4315)
Diffstat (limited to 'synapse/config/server.py')
-rw-r--r-- | synapse/config/server.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/synapse/config/server.py b/synapse/config/server.py index fb4585a2d4..120c2b81fc 100644 --- a/synapse/config/server.py +++ b/synapse/config/server.py @@ -15,6 +15,7 @@ # limitations under the License. import logging +import os.path from synapse.http.endpoint import parse_and_validate_server_name @@ -203,7 +204,7 @@ class ServerConfig(Config): ] }) - def default_config(self, server_name, **kwargs): + def default_config(self, server_name, data_dir_path, **kwargs): _, bind_port = parse_and_validate_server_name(server_name) if bind_port is not None: unsecure_port = bind_port - 400 @@ -211,7 +212,7 @@ class ServerConfig(Config): bind_port = 8448 unsecure_port = 8008 - pid_file = self.abspath("homeserver.pid") + pid_file = os.path.join(data_dir_path, "homeserver.pid") return """\ ## Server ## |