summary refs log tree commit diff
path: root/demo/start.sh
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2019-04-02 13:47:08 +0100
committerRichard van der Hoff <richard@matrix.org>2019-04-02 13:47:08 +0100
commitf41c9d37d6acce042d86d2e6b146a881cfffd8a9 (patch)
tree4b12f0213c9e44865336071edafe95195506a85a /demo/start.sh
parentMerge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes (diff)
parentFix sync bug when accepting invites (#4956) (diff)
downloadsynapse-f41c9d37d6acce042d86d2e6b146a881cfffd8a9.tar.xz
Merge branch 'develop' into matrix-org-hotfixes
Diffstat (limited to 'demo/start.sh')
-rwxr-xr-xdemo/start.sh20
1 files changed, 15 insertions, 5 deletions
diff --git a/demo/start.sh b/demo/start.sh

index dcc4d6f4fa..c4a1328a6f 100755 --- a/demo/start.sh +++ b/demo/start.sh
@@ -27,17 +27,27 @@ for port in 8080 8081 8082; do --config-path "$DIR/etc/$port.config" \ --report-stats no + printf '\n\n# Customisation made by demo/start.sh\n' >> $DIR/etc/$port.config + echo 'enable_registration: true' >> $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 + # messages rate limit + echo 'rc_messages_per_second: 1000' >> $DIR/etc/$port.config + echo 'rc_message_burst_count: 1000' >> $DIR/etc/$port.config + + # registration rate limit + printf 'rc_registration:\n per_second: 1000\n burst_count: 1000\n' >> $DIR/etc/$port.config + + # login rate limit + echo 'rc_login:' >> $DIR/etc/$port.config + printf ' address:\n per_second: 1000\n burst_count: 1000\n' >> $DIR/etc/$port.config + printf ' account:\n per_second: 1000\n burst_count: 1000\n' >> $DIR/etc/$port.config + printf ' failed_attempts:\n per_second: 1000\n burst_count: 1000\n' >> $DIR/etc/$port.config fi fi - perl -p -i -e 's/^enable_registration:.*/enable_registration: true/g' $DIR/etc/$port.config - if ! grep -F "full_twisted_stacktraces" -q $DIR/etc/$port.config; then echo "full_twisted_stacktraces: true" >> $DIR/etc/$port.config fi