diff --git a/src/freedombone-app-xmpp b/src/freedombone-app-xmpp index 9d737277..a845733f 100755 --- a/src/freedombone-app-xmpp +++ b/src/freedombone-app-xmpp @@ -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