Selaa lähdekoodia

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

Bob Mottram 8 vuotta sitten
vanhempi
commit
1a9f1a9e20
1 muutettua tiedostoa jossa 8 lisäystä ja 5 poistoa
  1. 8
    5
      src/freedombone-app-xmpp

+ 8
- 5
src/freedombone-app-xmpp Näytä tiedosto

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