summary refs log tree commit diff
path: root/synapse/config/server.py
diff options
context:
space:
mode:
authorRichard van der Hoff <1389908+richvdh@users.noreply.github.com>2018-12-21 16:04:57 +0100
committerAmber Brown <hawkowl@atleastfornow.net>2018-12-22 02:04:57 +1100
commit9c2af7b2c51e31a1baf5ef523a251b946774468c (patch)
tree6c5fe1adda3c4728c36313de4fcfd53699ab2779 /synapse/config/server.py
parentFix indentation in default config (#4313) (diff)
downloadsynapse-9c2af7b2c51e31a1baf5ef523a251b946774468c.tar.xz
Add a script to generate a clean config file (#4315)
Diffstat (limited to '')
-rw-r--r--synapse/config/server.py5
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 ##