Matrix domain certificate

This commit is contained in:
Bob Mottram 2017-02-09 12:53:42 +00:00
parent b94c1c9cae
commit 03c1fee44a
1 changed files with 4 additions and 4 deletions

View File

@ -736,10 +736,10 @@ function update_default_domain {
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
if [ -f /etc/ssl/certs/${MATRIX_DOMAIN_NAME}.pem ]; then
cp /etc/ssl/certs/${MATRIX_DOMAIN_NAME}.pem /var/lib/matrix/${MATRIX_DOMAIN_NAME}.tls.crt
cp /etc/ssl/certs/${MATRIX_DOMAIN_NAME}.dhparam /var/lib/matrix/${MATRIX_DOMAIN_NAME}.tls.dh
cp /etc/ssl/private/${MATRIX_DOMAIN_NAME}.key /var/lib/matrix/${MATRIX_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