|
@@ -48,7 +48,6 @@ matrix_variables=(ONION_ONLY
|
48
|
48
|
DEFAULT_DOMAIN_NAME)
|
49
|
49
|
|
50
|
50
|
function matrix_nginx {
|
51
|
|
- matrix_changed=
|
52
|
51
|
matrix_proxy_str=' \
|
53
|
52
|
location /matrix { \
|
54
|
53
|
proxy_pass https://localhost:8448; \
|
|
@@ -148,26 +147,21 @@ function matrix_nginx {
|
148
|
147
|
fi
|
149
|
148
|
|
150
|
149
|
nginx_ensite $DEFAULT_DOMAIN_NAME
|
151
|
|
- matrix_changed=1
|
152
|
150
|
fi
|
153
|
151
|
|
154
|
152
|
if ! grep "localhost:${MATRIX_PORT}" /etc/nginx/sites-available/${DEFAULT_DOMAIN_NAME}; then
|
155
|
153
|
sed -i "s|:443 ssl;|:443 ssl;${matrix_proxy_str}|g" /etc/nginx/sites-available/${DEFAULT_DOMAIN_NAME}
|
156
|
154
|
sed -i "s| default_server;| default_server;${matrix_proxy_str}|g" /etc/nginx/sites-available/${DEFAULT_DOMAIN_NAME}
|
157
|
|
- matrix_changed=1
|
158
|
155
|
fi
|
159
|
156
|
if ! grep "localhost:${TURN_PORT}" /etc/nginx/sites-available/${DEFAULT_DOMAIN_NAME}; then
|
160
|
157
|
sed -i "s|:443 ssl;|:443 ssl;${turn_proxy_str}|g" /etc/nginx/sites-available/${DEFAULT_DOMAIN_NAME}
|
161
|
158
|
sed -i "s| default_server;| default_server;${turn_proxy_str}|g" /etc/nginx/sites-available/${DEFAULT_DOMAIN_NAME}
|
162
|
|
- matrix_changed=1
|
163
|
159
|
fi
|
164
|
160
|
|
165
|
|
- if [ $matrix_changed ]; then
|
166
|
|
- systemctl restart nginx
|
167
|
|
- # wait for nginx to start otherwise user add fails later
|
168
|
|
- sleep 5
|
169
|
|
- fi
|
|
161
|
+ systemctl restart nginx
|
170
|
162
|
|
|
163
|
+ # wait for nginx to start otherwise user add fails later
|
|
164
|
+ sleep 5
|
171
|
165
|
}
|
172
|
166
|
|
173
|
167
|
function matrix_generate_synapse_file {
|