Only create certificate once

This commit is contained in:
Bob Mottram 2017-05-05 19:32:28 +01:00
parent a39685d1d3
commit 05f81082d2
1 changed files with 5 additions and 7 deletions

View File

@ -611,7 +611,12 @@ function install_matrix {
rm /etc/ssl/certs/${MATRIX_DOMAIN_NAME}.dhparam rm /etc/ssl/certs/${MATRIX_DOMAIN_NAME}.dhparam
fi fi
echo $'Obtaining certificate for the main domain' echo $'Obtaining certificate for the main domain'
function_check create_site_certificate
create_site_certificate ${MATRIX_DOMAIN_NAME} 'yes' create_site_certificate ${MATRIX_DOMAIN_NAME} 'yes'
if [[ $ONION_ONLY == "no" ]]; then
chmod 755 /etc/ssl/certs/${MATRIX_DOMAIN_NAME}.dhparam
fi
fi fi
fi fi
@ -637,13 +642,6 @@ function install_matrix {
function_check matrix_nginx function_check matrix_nginx
matrix_nginx matrix_nginx
function_check create_site_certificate
create_site_certificate $MATRIX_DOMAIN_NAME 'yes'
if [[ $ONION_ONLY == "no" ]]; then
chmod 755 /etc/ssl/certs/${MATRIX_DOMAIN_NAME}.dhparam
fi
function_check install_home_server function_check install_home_server
install_home_server install_home_server