Update matrix certs
This commit is contained in:
parent
9ac187f036
commit
6ea77bde31
|
@ -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 {
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue