Ensure that letsencrypt cert is obtained for xmpp when not in onion only mode

This commit is contained in:
Bob Mottram 2017-05-21 20:12:01 +01:00
parent 1c7cfc8926
commit 1a9f1a9e20
1 changed files with 8 additions and 5 deletions

View File

@ -809,11 +809,14 @@ function install_xmpp {
update_prosody_modules
if [[ $ONION_ONLY == 'no' ]]; then
# obtain a cert for the default domain
if [[ "$(cert_exists ${DEFAULT_DOMAIN_NAME} pem)" == "0" ]]; then
echo $'Obtaining certificate for the main domain'
create_site_certificate ${DEFAULT_DOMAIN_NAME} 'yes'
# obtain a cert for the default domain
if [[ "$(cert_exists ${DEFAULT_DOMAIN_NAME} pem)" == "0" ]]; then
create_site_certificate ${DEFAULT_DOMAIN_NAME} 'yes'
if [[ $ONION_ONLY == 'no' ]]; then
if [[ "$(cert_exists ${DEFAULT_DOMAIN_NAME} pem)" == "0" ]]; then
echo $'LetsEncrypt cert could not be obtained for xmpp'
exit 72342
fi
fi
fi