mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 13:46:02 -04:00
Add a script to generate a clean config file (#4315)
This commit is contained in:
parent
f3561f8d86
commit
9c2af7b2c5
11 changed files with 157 additions and 46 deletions
|
@ -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 ##
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue