@@ -12,7 +12,7 @@ PYTHONPATH=$(readlink -f "$(pwd)")
12
12
export PYTHONPATH
13
13
14
14
15
- echo $PYTHONPATH
15
+ echo " $PYTHONPATH "
16
16
17
17
for port in 8080 8081 8082; do
18
18
echo " Starting server on port $port ... "
@@ -28,12 +28,12 @@ for port in 8080 8081 8082; do
28
28
--config-path " $DIR /etc/$port .config" \
29
29
--report-stats no
30
30
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"
33
33
34
- echo " public_baseurl: http://localhost:$port /" >> $DIR /etc/$port .config
34
+ echo " public_baseurl: http://localhost:$port /" >> " $DIR /etc/$port .config"
35
35
36
- echo ' enable_registration: true' >> $DIR /etc/$port .config
36
+ echo ' enable_registration: true' >> " $DIR /etc/$port .config"
37
37
38
38
# Warning, this heredoc depends on the interaction of tabs and spaces. Please don't
39
39
# accidentaly bork me with your fancy settings.
@@ -57,26 +57,26 @@ for port in 8080 8081 8082; do
57
57
compress: false
58
58
PORTLISTENERS
59
59
)
60
- echo " ${listeners} " >> $DIR /etc/$port .config
60
+ echo " ${listeners} " >> " $DIR /etc/$port .config"
61
61
62
62
# 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"
67
67
68
68
# 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"
71
71
72
72
# 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"
74
74
75
75
# 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"
80
80
81
81
# Reduce the blacklist
82
82
blacklist=$( cat << -BLACK
@@ -91,12 +91,12 @@ for port in 8080 8081 8082; do
91
91
- 'fc00::/7'
92
92
BLACK
93
93
)
94
- echo " ${blacklist} " >> $DIR /etc/$port .config
94
+ echo " ${blacklist} " >> " $DIR /etc/$port .config"
95
95
fi
96
96
97
97
# Check script parameters
98
98
if [ $# -eq 1 ]; then
99
- if [ $1 = " --no-rate-limit" ]; then
99
+ if [ " $1 " = " --no-rate-limit" ]; then
100
100
101
101
# Disable any rate limiting
102
102
ratelimiting=$( cat << -RC
@@ -138,15 +138,15 @@ for port in 8080 8081 8082; do
138
138
burst_count: 1000
139
139
RC
140
140
)
141
- echo " ${ratelimiting} " >> $DIR /etc/$port .config
141
+ echo " ${ratelimiting} " >> " $DIR /etc/$port .config"
142
142
fi
143
143
fi
144
144
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"
147
147
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"
150
150
fi
151
151
152
152
python3 -m synapse.app.homeserver \
0 commit comments