Sleep anyway

This commit is contained in:
Bob Mottram 2016-12-30 23:57:44 +00:00
parent c984d027f4
commit 840c7d652d
1 changed files with 3 additions and 9 deletions

View File

@ -48,7 +48,6 @@ matrix_variables=(ONION_ONLY
DEFAULT_DOMAIN_NAME)
function matrix_nginx {
matrix_changed=
matrix_proxy_str=' \
location /matrix { \
proxy_pass https://localhost:8448; \
@ -148,26 +147,21 @@ function matrix_nginx {
fi
nginx_ensite $DEFAULT_DOMAIN_NAME
matrix_changed=1
fi
if ! grep "localhost:${MATRIX_PORT}" /etc/nginx/sites-available/${DEFAULT_DOMAIN_NAME}; then
sed -i "s|:443 ssl;|:443 ssl;${matrix_proxy_str}|g" /etc/nginx/sites-available/${DEFAULT_DOMAIN_NAME}
sed -i "s| default_server;| default_server;${matrix_proxy_str}|g" /etc/nginx/sites-available/${DEFAULT_DOMAIN_NAME}
matrix_changed=1
fi
if ! grep "localhost:${TURN_PORT}" /etc/nginx/sites-available/${DEFAULT_DOMAIN_NAME}; then
sed -i "s|:443 ssl;|:443 ssl;${turn_proxy_str}|g" /etc/nginx/sites-available/${DEFAULT_DOMAIN_NAME}
sed -i "s| default_server;| default_server;${turn_proxy_str}|g" /etc/nginx/sites-available/${DEFAULT_DOMAIN_NAME}
matrix_changed=1
fi
if [ $matrix_changed ]; then
systemctl restart nginx
# wait for nginx to start otherwise user add fails later
sleep 5
fi
}
function matrix_generate_synapse_file {