summary refs log tree commit diff
path: root/synapse/config/_base.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2015-08-07 19:28:39 +0100
committerErik Johnston <erik@matrix.org>2015-08-07 19:28:39 +0100
commit7dec0b2beeca1d1b7d298dc814fcfc5aff52340c (patch)
tree1579a8cec0170025627645ced547704cf2410605 /synapse/config/_base.py
parentBatch up various DB requests for event -> state (diff)
parentMerge pull request #212 from matrix-org/erikj/cache_deferreds (diff)
downloadsynapse-7dec0b2beeca1d1b7d298dc814fcfc5aff52340c.tar.xz
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/dictionary_cache
Diffstat (limited to 'synapse/config/_base.py')
-rw-r--r--synapse/config/_base.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/synapse/config/_base.py b/synapse/config/_base.py
index d483c67c6a..c408db2b4a 100644
--- a/synapse/config/_base.py
+++ b/synapse/config/_base.py
@@ -139,6 +139,11 @@ class Config(object):
             help="Generate a config file for the server name"
         )
         config_parser.add_argument(
+            "--generate-keys",
+            action="store_true",
+            help="Generate any missing key files then exit"
+        )
+        config_parser.add_argument(
             "-H", "--server-name",
             help="The server name to generate a config file for"
         )
@@ -230,4 +235,8 @@ class Config(object):
 
         obj.invoke_all("read_arguments", args)
 
+        if config_args.generate_keys:
+            obj.invoke_all("generate_files", config)
+            sys.exit(0)
+
         return obj