浏览代码

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

Bob Mottram 8 年前
父节点
当前提交
1a9f1a9e20
共有 1 个文件被更改,包括 8 次插入5 次删除
  1. 8
    5
      src/freedombone-app-xmpp

+ 8
- 5
src/freedombone-app-xmpp 查看文件

809
 
809
 
810
     update_prosody_modules
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
         fi
820
         fi
818
     fi
821
     fi
819
 
822