瀏覽代碼

Server name

Bob Mottram 8 年之前
父節點
當前提交
3700fde49e
共有 1 個文件被更改,包括 7 次插入10 次删除
  1. 7
    10
      src/freedombone-app-matrix

+ 7
- 10
src/freedombone-app-matrix 查看文件

@@ -62,7 +62,7 @@ function matrix_nginx {
62 62
         proxy_set_header X-Forwarded-For $remote_addr; \
63 63
     }'
64 64
     turn_proxy_str=' \
65
-    location /turn { \
65
+    location /_turn { \
66 66
         proxy_pass https://localhost:3478; \
67 67
         proxy_set_header X-Forwarded-For $remote_addr; \
68 68
     }'
@@ -74,7 +74,7 @@ function matrix_nginx {
74 74
         proxy_set_header X-Forwarded-For $remote_addr; \
75 75
     }'
76 76
         turn_proxy_str=' \
77
-    location /turn { \
77
+    location /_turn { \
78 78
         proxy_pass http://localhost:3478; \
79 79
         proxy_set_header X-Forwarded-For $remote_addr; \
80 80
     }'
@@ -207,7 +207,7 @@ function matrix_configure_homeserver_yaml {
207 207
 
208 208
     local ymltemp="$(mktemp)"
209 209
 
210
-    awk -v TURNURIES="turn_uris: [\"turn:${DEFAULT_DOMAIN_NAME}/turn?transport=udp\", \"turn:${DEFAULT_DOMAIN_NAME}/turn?transport=tcp\"]" \
210
+    awk -v TURNURIES="turn_uris: [\"turn:${DEFAULT_DOMAIN_NAME}/_turn?transport=udp\", \"turn:${DEFAULT_DOMAIN_NAME}/_turn?transport=tcp\"]" \
211 211
         -v TURNSHAREDSECRET="turn_shared_secret: \"${turnkey}\"" \
212 212
         -v PIDFILE="pid_file: ${MATRIX_DATA_DIR}/homeserver.pid" \
213 213
         -v DATABASE="database: \"${MATRIX_DATA_DIR}/homeserver.db\"" \
@@ -235,9 +235,9 @@ function matrix_configure_homeserver_yaml {
235 235
     sed -i "s|log_file:.*|log_file: \"/dev/null\"|g" "${filepath}"
236 236
     sed -i '0,/bind_address:.*/s//bind_address: 127.0.0.1/' "${filepath}"
237 237
     sed -i '0,/x_forwarded:.*/s//x_forwarded: true/' "${filepath}"
238
-    sed -i "s|server_name:.*|server_name: \"${DEFAULT_DOMAIN_NAME}/_matrix\"|g" "${filepath}"
239
-    sed -i "/trusted_third_party_id_servers:/a     - ${DEFAULT_DOMAIN_NAME}/_matrixid" "${filepath}"
240
-    sed -i "s|- ${DEFAULT_DOMAIN_NAME}/_matrixid|    - ${DEFAULT_DOMAIN_NAME}/_matrixid|g" "${filepath}"
238
+    sed -i "s|server_name:.*|server_name: \"${DEFAULT_DOMAIN_NAME}\"|g" "${filepath}"
239
+    sed -i "/trusted_third_party_id_servers:/a     - ${DEFAULT_DOMAIN_NAME}" "${filepath}"
240
+    sed -i "s|- ${DEFAULT_DOMAIN_NAME}|    - ${DEFAULT_DOMAIN_NAME}|g" "${filepath}"
241 241
 }
242 242
 
243 243
 function matrix_configure_identityserver {
@@ -248,7 +248,7 @@ function matrix_configure_identityserver {
248 248
     sed -i "s|Sydent Validation|Freedombone Matrix Account Validation|g" ${filepath}
249 249
     sed -i "s|pidfile.path.*|pidfile.path = /etc/sydent/sydent.pid|g" ${filepath}
250 250
     sed -i "s|log.path.*|log.path = /dev/null|g" ${filepath}
251
-    sed -i "s|server.name.*|server.name = ${DEFAULT_DOMAIN_NAME}/_matrixid|g" ${filepath}
251
+    sed -i "s|server.name.*|server.name = ${DEFAULT_DOMAIN_NAME}|g" ${filepath}
252 252
 }
253 253
 
254 254
 function matrix_diff {
@@ -472,7 +472,6 @@ function restore_remote_matrix {
472 472
 }
473 473
 
474 474
 function remove_matrix {
475
-    firewall_remove ${MATRIX_PORT}
476 475
     systemctl stop matrix
477 476
     systemctl stop sydent
478 477
 
@@ -644,8 +643,6 @@ function install_home_server {
644 643
     fi
645 644
     chmod -R 700 $MATRIX_DATA_DIR/homeserver.db
646 645
 
647
-    firewall_add matrix ${MATRIX_PORT}
648
-
649 646
     MATRIX_ONION_HOSTNAME=$(add_onion_service matrix ${MATRIX_PORT} ${MATRIX_PORT})
650 647
     if [ ! ${MATRIX_PASSWORD} ]; then
651 648
         if [ -f ${IMAGE_PASSWORD_FILE} ]; then