Single quotes

This commit is contained in:
Bob Mottram 2016-12-30 23:01:37 +00:00
parent 418a8bb9d6
commit 1d7ebc1585
1 changed files with 11 additions and 11 deletions

View File

@ -48,16 +48,16 @@ matrix_variables=(ONION_ONLY
DEFAULT_DOMAIN_NAME)
function matrix_nginx {
matrix_proxy_str="
location /matrix {
proxy_pass https://localhost:${MATRIX_PORT};
proxy_buffering on;
}"
turn_proxy_str="
location /turn {
proxy_pass https://localhost:${TURN_PORT};
proxy_buffering on;
}"
matrix_proxy_str=' \
location /matrix { \
proxy_pass https://localhost:8448; \
proxy_buffering on; \
}'
turn_proxy_str=' \
location /turn { \
proxy_pass https://localhost:3478; \
proxy_buffering on; \
}'
if [ ! -f /etc/nginx/sites-available/${DEFAULT_DOMAIN_NAME} ]; then
matrix_nginx_site=/etc/nginx/sites-available/$DEFAULT_DOMAIN_NAME
@ -140,7 +140,7 @@ function matrix_nginx {
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}
fi
if ! grep 'localhost:${TURN_PORT}' /etc/nginx/sites-available/${DEFAULT_DOMAIN_NAME}; then
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}
fi