Skip to content
Snippets Groups Projects
Commit 347a1728 authored by Bob Mottram's avatar Bob Mottram
Browse files

underscore

parent 8b78504a
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment