summary refs log tree commit diff
path: root/demo/start.sh
diff options
context:
space:
mode:
authorMark Haines <mark.haines@matrix.org>2015-08-13 17:27:53 +0100
committerMark Haines <mark.haines@matrix.org>2015-08-13 17:27:53 +0100
commitc5966b2a97090bf5b1e2ced83e3f424a3f4d4cad (patch)
tree3cc3a75259e130906b963570e2c747f5ab0cba2d /demo/start.sh
parentAdd a few strategic new lines to break up the on_query_client_keys and on_cla... (diff)
parentMerge pull request #224 from matrix-org/erikj/reactor_metrics (diff)
downloadsynapse-c5966b2a97090bf5b1e2ced83e3f424a3f4d4cad.tar.xz
Merge remote-tracking branch 'origin/develop' into markjh/end-to-end-key-federation
Diffstat (limited to 'demo/start.sh')
-rwxr-xr-xdemo/start.sh20
1 files changed, 11 insertions, 9 deletions
diff --git a/demo/start.sh b/demo/start.sh
index b9cc14b9d2..572dbfab0b 100755
--- a/demo/start.sh
+++ b/demo/start.sh
@@ -8,14 +8,6 @@ cd "$DIR/.."
 
 mkdir -p demo/etc
 
-# Check the --no-rate-limit param
-PARAMS=""
-if [ $# -eq 1 ]; then
-    if [ $1 = "--no-rate-limit" ]; then
-	    PARAMS="--rc-messages-per-second 1000 --rc-message-burst-count 1000"
-    fi
-fi
-
 export PYTHONPATH=$(readlink -f $(pwd))
 
 
@@ -31,10 +23,20 @@ for port in 8080 8081 8082; do
     #rm $DIR/etc/$port.config
     python -m synapse.app.homeserver \
         --generate-config \
-        --enable_registration \
         -H "localhost:$https_port" \
         --config-path "$DIR/etc/$port.config" \
 
+    # Check script parameters
+    if [ $# -eq 1 ]; then
+        if [ $1 = "--no-rate-limit" ]; then
+            # Set high limits in config file to disable rate limiting
+            perl -p -i -e 's/rc_messages_per_second.*/rc_messages_per_second: 1000/g' $DIR/etc/$port.config
+            perl -p -i -e 's/rc_message_burst_count.*/rc_message_burst_count: 1000/g' $DIR/etc/$port.config
+        fi
+    fi
+
+    perl -p -i -e 's/^enable_registration:.*/enable_registration: true/g' $DIR/etc/$port.config
+
     python -m synapse.app.homeserver \
         --config-path "$DIR/etc/$port.config" \
         -D \