@@ -12,7 +12,7 @@ PYTHONPATH=$(readlink -f "$(pwd)")
1212export PYTHONPATH
1313
1414
15- echo $PYTHONPATH
15+ echo " $PYTHONPATH "
1616
1717for port in 8080 8081 8082; do
1818 echo " Starting server on port $port ... "
@@ -28,12 +28,12 @@ for port in 8080 8081 8082; do
2828 --config-path " $DIR /etc/$port .config" \
2929 --report-stats no
3030
31- if ! grep -F " Customisation made by demo/start.sh" -q $DIR /etc/$port .config; then
32- printf ' \n\n# Customisation made by demo/start.sh\n' >> $DIR /etc/$port .config
31+ if ! grep -F " Customisation made by demo/start.sh" -q " $DIR /etc/$port .config" ; then
32+ printf ' \n\n# Customisation made by demo/start.sh\n' >> " $DIR /etc/$port .config"
3333
34- echo " public_baseurl: http://localhost:$port /" >> $DIR /etc/$port .config
34+ echo " public_baseurl: http://localhost:$port /" >> " $DIR /etc/$port .config"
3535
36- echo ' enable_registration: true' >> $DIR /etc/$port .config
36+ echo ' enable_registration: true' >> " $DIR /etc/$port .config"
3737
3838 # Warning, this heredoc depends on the interaction of tabs and spaces. Please don't
3939 # accidentaly bork me with your fancy settings.
@@ -57,26 +57,26 @@ for port in 8080 8081 8082; do
5757 compress: false
5858 PORTLISTENERS
5959 )
60- echo " ${listeners} " >> $DIR /etc/$port .config
60+ echo " ${listeners} " >> " $DIR /etc/$port .config"
6161
6262 # Disable tls for the servers
63- printf ' \n\n# Disable tls on the servers.' >> $DIR /etc/$port .config
64- echo ' # DO NOT USE IN PRODUCTION' >> $DIR /etc/$port .config
65- echo ' use_insecure_ssl_client_just_for_testing_do_not_use: true' >> $DIR /etc/$port .config
66- echo ' federation_verify_certificates: false' >> $DIR /etc/$port .config
63+ printf ' \n\n# Disable tls on the servers.' >> " $DIR /etc/$port .config"
64+ echo ' # DO NOT USE IN PRODUCTION' >> " $DIR /etc/$port .config"
65+ echo ' use_insecure_ssl_client_just_for_testing_do_not_use: true' >> " $DIR /etc/$port .config"
66+ echo ' federation_verify_certificates: false' >> " $DIR /etc/$port .config"
6767
6868 # Set tls paths
69- echo " tls_certificate_path: \" $DIR /etc/localhost:$https_port .tls.crt\" " >> $DIR /etc/$port .config
70- echo " tls_private_key_path: \" $DIR /etc/localhost:$https_port .tls.key\" " >> $DIR /etc/$port .config
69+ echo " tls_certificate_path: \" $DIR /etc/localhost:$https_port .tls.crt\" " >> " $DIR /etc/$port .config"
70+ echo " tls_private_key_path: \" $DIR /etc/localhost:$https_port .tls.key\" " >> " $DIR /etc/$port .config"
7171
7272 # Generate tls keys
73- openssl req -x509 -newkey rsa:4096 -keyout $DIR /etc/localhost:$https_port .tls.key -out $DIR /etc/localhost:$https_port .tls.crt -days 365 -nodes -subj " /O=matrix"
73+ openssl req -x509 -newkey rsa:4096 -keyout " $DIR /etc/localhost:$https_port .tls.key" -out " $DIR /etc/localhost:$https_port .tls.crt" -days 365 -nodes -subj " /O=matrix"
7474
7575 # Ignore keys from the trusted keys server
76- echo ' # Ignore keys from the trusted keys server' >> $DIR /etc/$port .config
77- echo ' trusted_key_servers:' >> $DIR /etc/$port .config
78- echo ' - server_name: "matrix.org"' >> $DIR /etc/$port .config
79- echo ' accept_keys_insecurely: true' >> $DIR /etc/$port .config
76+ echo ' # Ignore keys from the trusted keys server' >> " $DIR /etc/$port .config"
77+ echo ' trusted_key_servers:' >> " $DIR /etc/$port .config"
78+ echo ' - server_name: "matrix.org"' >> " $DIR /etc/$port .config"
79+ echo ' accept_keys_insecurely: true' >> " $DIR /etc/$port .config"
8080
8181 # Reduce the blacklist
8282 blacklist=$( cat << -BLACK
@@ -91,12 +91,12 @@ for port in 8080 8081 8082; do
9191 - 'fc00::/7'
9292 BLACK
9393 )
94- echo " ${blacklist} " >> $DIR /etc/$port .config
94+ echo " ${blacklist} " >> " $DIR /etc/$port .config"
9595 fi
9696
9797 # Check script parameters
9898 if [ $# -eq 1 ]; then
99- if [ $1 = " --no-rate-limit" ]; then
99+ if [ " $1 " = " --no-rate-limit" ]; then
100100
101101 # Disable any rate limiting
102102 ratelimiting=$( cat << -RC
@@ -138,15 +138,15 @@ for port in 8080 8081 8082; do
138138 burst_count: 1000
139139 RC
140140 )
141- echo " ${ratelimiting} " >> $DIR /etc/$port .config
141+ echo " ${ratelimiting} " >> " $DIR /etc/$port .config"
142142 fi
143143 fi
144144
145- if ! grep -F " full_twisted_stacktraces" -q $DIR /etc/$port .config; then
146- echo " full_twisted_stacktraces: true" >> $DIR /etc/$port .config
145+ if ! grep -F " full_twisted_stacktraces" -q " $DIR /etc/$port .config" ; then
146+ echo " full_twisted_stacktraces: true" >> " $DIR /etc/$port .config"
147147 fi
148- if ! grep -F " report_stats" -q $DIR /etc/$port .config ; then
149- echo " report_stats: false" >> $DIR /etc/$port .config
148+ if ! grep -F " report_stats" -q " $DIR /etc/$port .config" ; then
149+ echo " report_stats: false" >> " $DIR /etc/$port .config"
150150 fi
151151
152152 python3 -m synapse.app.homeserver \
0 commit comments