From 1a9f1a9e20e868529894efefd4668e617b7dd885 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 21 May 2017 20:12:01 +0100 Subject: [PATCH] Ensure that letsencrypt cert is obtained for xmpp when not in onion only mode --- src/freedombone-app-xmpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) 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