mirror of
				https://github.com/mail-in-a-box/mailinabox.git
				synced 2025-11-03 19:30:54 +00:00 
			
		
		
		
	fix problem with SSL certificate provisioning
This commit is contained in:
		
							parent
							
								
									67b2c0c0a4
								
							
						
					
					
						commit
						57473ef39c
					
				@ -313,7 +313,7 @@ def provision_certificates(env, limit_domains):
 | 
				
			|||||||
				webroot = os.path.join(account_path, 'webroot')
 | 
									webroot = os.path.join(account_path, 'webroot')
 | 
				
			||||||
				os.makedirs(webroot, exist_ok=True)
 | 
									os.makedirs(webroot, exist_ok=True)
 | 
				
			||||||
				with tempfile.TemporaryDirectory() as d:
 | 
									with tempfile.TemporaryDirectory() as d:
 | 
				
			||||||
					miab_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
 | 
										miab_dir = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
 | 
				
			||||||
					cert_file = os.path.join(d, 'cert_and_chain.pem')
 | 
										cert_file = os.path.join(d, 'cert_and_chain.pem')
 | 
				
			||||||
					print("Provisioning TLS certificates for " + ", ".join(domain_list) + ".")
 | 
										print("Provisioning TLS certificates for " + ", ".join(domain_list) + ".")
 | 
				
			||||||
					certbotret = subprocess.check_output([
 | 
										certbotret = subprocess.check_output([
 | 
				
			||||||
@ -331,8 +331,8 @@ def provision_certificates(env, limit_domains):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
						"--manual",
 | 
											"--manual",
 | 
				
			||||||
						"--preferred-challenge", "dns",
 | 
											"--preferred-challenge", "dns",
 | 
				
			||||||
						"--manual-auth-hook", os.path.join(miab_dir, "/tools/dns-auth.sh"),
 | 
											"--manual-auth-hook", os.path.join(miab_dir, "tools/dns-auth.sh"),
 | 
				
			||||||
						"--manual-cleanup-hook", os.path.join(miab_dir, "/tools/dns-cleanup.sh"),
 | 
											"--manual-cleanup-hook", os.path.join(miab_dir, "tools/dns-cleanup.sh"),
 | 
				
			||||||
 | 
					
 | 
				
			||||||
						"--config-dir", account_path,
 | 
											"--config-dir", account_path,
 | 
				
			||||||
						#"--staging",
 | 
											#"--staging",
 | 
				
			||||||
 | 
				
			|||||||
@ -5,4 +5,4 @@
 | 
				
			|||||||
API_KEY=`cat /var/lib/mailinabox/api.key`
 | 
					API_KEY=`cat /var/lib/mailinabox/api.key`
 | 
				
			||||||
HOSTNAME=`hostname`
 | 
					HOSTNAME=`hostname`
 | 
				
			||||||
 | 
					
 | 
				
			||||||
curl -s -X DELETE --user "$API_KEY:" https://$HOSTNAME/admin/dns/custom/_acme-challenge.$CERTBOT_DOMAIN/TXT
 | 
					curl -s -X DELETE --user "$API_KEY:" https://$HOSTNAME/admin/dns/custom/_acme-challenge.$CERTBOT_DOMAIN/TXT
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user