From 347a172822ec7b61d615c997b45c0d7ab4105ef0 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sat, 31 Dec 2016 15:54:00 +0000 Subject: [PATCH] underscore --- src/freedombone-app-matrix | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/freedombone-app-matrix b/src/freedombone-app-matrix index b96d699e..4ccf0a14 100755 --- a/src/freedombone-app-matrix +++ b/src/freedombone-app-matrix @@ -52,12 +52,12 @@ matrix_variables=(ONION_ONLY function matrix_nginx { matrix_identityserver_proxy_str=' \ - location /matrixid { \ + location /_matrixid { \ proxy_pass http://localhost:8081; \ proxy_set_header X-Forwarded-For $remote_addr; \ }' matrix_proxy_str=' \ - location /matrix { \ + location /_matrix { \ proxy_pass https://localhost:8448; \ proxy_set_header X-Forwarded-For $remote_addr; \ }' @@ -69,7 +69,7 @@ function matrix_nginx { if [[ $ONION_ONLY != 'no' ]]; then matrix_proxy_str=' \ - location /matrix { \ + location /_matrix { \ proxy_pass http://localhost:8448; \ proxy_set_header X-Forwarded-For $remote_addr; \ }' @@ -235,8 +235,9 @@ function matrix_configure_homeserver_yaml { sed -i "s|log_file:.*|log_file: \"/dev/null\"|g" "${filepath}" sed -i '0,/bind_address:.*/s//bind_address: 127.0.0.1/' "${filepath}" sed -i '0,/x_forwarded:.*/s//x_forwarded: true/' "${filepath}" - sed -i "s|server_name:.*|server_name: \"${DEFAULT_DOMAIN_NAME}/matrix\"|g" "${filepath}" - sed -i "/trusted_third_party_id_servers:/a - ${DEFAULT_DOMAIN_NAME}/matrixid" "${filepath}" + sed -i "s|server_name:.*|server_name: \"${DEFAULT_DOMAIN_NAME}/_matrix\"|g" "${filepath}" + sed -i "/trusted_third_party_id_servers:/a - ${DEFAULT_DOMAIN_NAME}/_matrixid" "${filepath}" + sed -i "s|- ${DEFAULT_DOMAIN_NAME}/_matrixid| - ${DEFAULT_DOMAIN_NAME}/_matrixid|g" "${filepath}" } function matrix_configure_identityserver { @@ -247,7 +248,7 @@ function matrix_configure_identityserver { sed -i "s|Sydent Validation|Freedombone Matrix Account Validation|g" ${filepath} sed -i "s|pidfile.path.*|pidfile.path = /etc/sydent/sydent.pid|g" ${filepath} sed -i "s|log.path.*|log.path = /dev/null|g" ${filepath} - sed -i "s|server.name.*|server.name = ${DEFAULT_DOMAIN_NAME}/matrixid|g" ${filepath} + sed -i "s|server.name.*|server.name = ${DEFAULT_DOMAIN_NAME}/_matrixid|g" ${filepath} } function matrix_diff { @@ -445,9 +446,9 @@ function remove_matrix { delgroup matrix remove_onion_service matrix ${MATRIX_PORT} - sed -i "/location \/matrix {/,/}/d" /etc/nginx/sites-available/${DEFAULT_DOMAIN_NAME} - sed -i "/location \/matrixid {/,/}/d" /etc/nginx/sites-available/${DEFAULT_DOMAIN_NAME} - sed -i "/location \/turn {/,/}/d" /etc/nginx/sites-available/${DEFAULT_DOMAIN_NAME} + sed -i "/location \/_matrix {/,/}/d" /etc/nginx/sites-available/${DEFAULT_DOMAIN_NAME} + sed -i "/location \/_matrixid {/,/}/d" /etc/nginx/sites-available/${DEFAULT_DOMAIN_NAME} + sed -i "/location \/_turn {/,/}/d" /etc/nginx/sites-available/${DEFAULT_DOMAIN_NAME} systemctl restart nginx remove_completion_param install_matrix