|
@@ -59,6 +59,19 @@ function matrix_nginx {
|
59
|
59
|
proxy_buffering on; \
|
60
|
60
|
}'
|
61
|
61
|
|
|
62
|
+ if [[ $ONION_ONLY != 'no' ]]; then
|
|
63
|
+ matrix_proxy_str=' \
|
|
64
|
+ location /matrix { \
|
|
65
|
+ proxy_pass http://localhost:8448; \
|
|
66
|
+ proxy_buffering on; \
|
|
67
|
+ }'
|
|
68
|
+ turn_proxy_str=' \
|
|
69
|
+ location /turn { \
|
|
70
|
+ proxy_pass http://localhost:3478; \
|
|
71
|
+ proxy_buffering on; \
|
|
72
|
+ }'
|
|
73
|
+ fi
|
|
74
|
+
|
62
|
75
|
if [ ! -f /etc/nginx/sites-available/${DEFAULT_DOMAIN_NAME} ]; then
|
63
|
76
|
matrix_nginx_site=/etc/nginx/sites-available/$DEFAULT_DOMAIN_NAME
|
64
|
77
|
if [[ $ONION_ONLY == "no" ]]; then
|
|
@@ -450,6 +463,7 @@ function install_matrix {
|
450
|
463
|
groupadd matrix
|
451
|
464
|
useradd -c "Matrix system account" -d $MATRIX_DATA_DIR -m -r -g matrix matrix
|
452
|
465
|
|
|
466
|
+ chmod -R 700 /var/lib/matrix/homeserver.yaml
|
453
|
467
|
chown -R matrix:matrix /etc/matrix
|
454
|
468
|
chown -R matrix:matrix $MATRIX_DATA_DIR
|
455
|
469
|
|
|
@@ -471,6 +485,10 @@ function install_matrix {
|
471
|
485
|
systemctl daemon-reload
|
472
|
486
|
systemctl start matrix
|
473
|
487
|
|
|
488
|
+ if [ -f /var/lib/matrix/homeserver.db ]; then
|
|
489
|
+ chmod -R 700 /var/lib/matrix/homeserver.db
|
|
490
|
+ fi
|
|
491
|
+
|
474
|
492
|
update_default_domain
|
475
|
493
|
|
476
|
494
|
firewall_add matrix ${MATRIX_PORT}
|