diff --git a/src/freedombone-app-matrix b/src/freedombone-app-matrix index 9c93cd7b..274f46c4 100755 --- a/src/freedombone-app-matrix +++ b/src/freedombone-app-matrix @@ -81,6 +81,11 @@ function matrix_configure_homeserver_yaml { }' "${filepath}" > "${ymltemp}" mv ${ymltemp} "${filepath}" + + if [[ $ONION_ONLY != 'no' ]]; then + sed -i 's|no_tls: .*|no_tls: True|g' "${filepath}" + fi + sed -i 's|enable_registration_captcha.*|enable_registration_captcha: False|g' "${filepath}" } function matrix_diff { diff --git a/src/freedombone-utils-web b/src/freedombone-utils-web index f7752a39..e42f9086 100755 --- a/src/freedombone-utils-web +++ b/src/freedombone-utils-web @@ -732,6 +732,20 @@ function update_default_domain { systemctl reload prosody fi + if [ -d /var/lib/matrix ]; then + if [ -f /etc/ssl/certs/${DEFAULT_DOMAIN_NAME}.pem ]; then + cp /etc/ssl/certs/${DEFAULT_DOMAIN_NAME}.pem /var/lib/matrix/${DEFAULT_DOMAIN_NAME}.tls.crt + cp /etc/ssl/certs/${DEFAULT_DOMAIN_NAME}.dhparam /var/lib/matrix/${DEFAULT_DOMAIN_NAME}.tls.dh + cp /etc/ssl/private/${DEFAULT_DOMAIN_NAME}.key /var/lib/matrix/${DEFAULT_DOMAIN_NAME}.tls.key + chown -R matrix:matrix /var/lib/matrix + chmod -R 700 /var/lib/matrix/*.pem + chmod -R 700 /var/lib/matrix/*.key + chmod -R 700 /var/lib/matrix/*.dhparam + systemctl restart turn + systemctl restart matrix + fi + fi + if [ -d /var/lib/mumble-server ]; then if [[ "$(cert_exists ${DEFAULT_DOMAIN_NAME} pem)" == "1" ]]; then cp /etc/ssl/certs/${DEFAULT_DOMAIN_NAME}.pem /var/lib/mumble-server/mumble.pem