diff --git a/src/freedombone-app-matrix b/src/freedombone-app-matrix index 14956bf2..0121c225 100755 --- a/src/freedombone-app-matrix +++ b/src/freedombone-app-matrix @@ -47,7 +47,7 @@ MATRIX_CODE= MATRIX_DATA_DIR='/var/lib/matrix' MATRIX_HTTP_PORT=8448 -MATRIX_PORT=8008 +MATRIX_PORT=8009 MATRIX_FEDERATION_ONION_PORT=8111 MATRIX_ONION_PORT=8109 MATRIX_REPO="https://github.com/matrix-org/synapse" @@ -90,12 +90,12 @@ function matrix_nginx { echo ' location /_matrix {' >> $matrix_nginx_site function_check nginx_limits nginx_limits ${MATRIX_DOMAIN_NAME} '15m' - echo ' proxy_pass http://localhost:8008;' >> $matrix_nginx_site + echo " proxy_pass http://localhost:${MATRIX_PORT};" >> $matrix_nginx_site echo ' }' >> $matrix_nginx_site echo '}' >> $matrix_nginx_site echo '' >> $matrix_nginx_site echo 'server {' >> $matrix_nginx_site - echo " listen 0.0.0.0:8448;" >> $matrix_nginx_site + echo " listen 0.0.0.0:${MATRIX_HTTP_PORT};" >> $matrix_nginx_site echo " server_name ${MATRIX_DOMAIN_NAME};" >> $matrix_nginx_site echo '' >> $matrix_nginx_site echo ' # Security' >> $matrix_nginx_site @@ -120,7 +120,7 @@ function matrix_nginx { echo ' location /_matrix {' >> $matrix_nginx_site function_check nginx_limits nginx_limits ${MATRIX_DOMAIN_NAME} '15m' - echo ' proxy_pass http://localhost:8008;' >> $matrix_nginx_site + echo " proxy_pass http://localhost:${MATRIX_PORT};" >> $matrix_nginx_site echo ' }' >> $matrix_nginx_site echo '}' >> $matrix_nginx_site echo '' >> $matrix_nginx_site @@ -144,7 +144,7 @@ function matrix_nginx { echo ' location /_matrix {' >> $matrix_nginx_site function_check nginx_limits nginx_limits ${MATRIX_DOMAIN_NAME} '15m' - echo ' proxy_pass http://localhost:8008;' >> $matrix_nginx_site + echo " proxy_pass http://localhost:${MATRIX_PORT};" >> $matrix_nginx_site echo ' }' >> $matrix_nginx_site echo '}' >> $matrix_nginx_site echo '' >> $matrix_nginx_site @@ -165,7 +165,7 @@ function matrix_nginx { echo ' location /_matrix {' >> $matrix_nginx_site function_check nginx_limits nginx_limits ${MATRIX_DOMAIN_NAME} '15m' - echo ' proxy_pass http://localhost:8008;' >> $matrix_nginx_site + echo " proxy_pass http://localhost:${MATRIX_PORT};" >> $matrix_nginx_site echo ' }' >> $matrix_nginx_site echo '}' >> $matrix_nginx_site @@ -219,7 +219,8 @@ function matrix_configure_homeserver_yaml { fi sed -i "s|tls_dh_params_path:.*|tls_dh_params_path: \"/etc/ssl/certs/${MATRIX_DOMAIN_NAME}.dhparam\"|g" "${filepath}" fi - sed -i 's|8448|8449|g' "${filepath}" + sed -i "s|${MATRIX_HTTP_PORT}|8449|g" "${filepath}" + sed -i "s|8008|${MATRIX_PORT}|g" "${filepath}" sed -i 's|tls:.*|tls: False|g' "${filepath}" sed -i 's|no_tls: .*|no_tls: True|g' "${filepath}" sed -i ':a;N;$!ba;s/ tls: [^\n]*/ tls: False/2' "${filepath}"