Update le

This commit is contained in:
VirtuBox
2019-07-24 15:42:47 +02:00
parent a97bc9a4b8
commit c860dd7ea8
2 changed files with 9 additions and 6 deletions

View File

@@ -1298,6 +1298,7 @@ def removeNginxConf(self, domain):
def removeAcmeConf(self, domain):
if os.path.isdir('/etc/letsencrypt/renewal/{0}_ecc'
.format(domain)):
Log.info(self, "Removing Acme configuration")
Log.debug(self, "Removing Acme configuration")
try:
WOShellExec.cmd_exec(self, "/etc/letsencrypt/acme.sh "
@@ -1308,18 +1309,21 @@ def removeAcmeConf(self, domain):
.format(domain))
except CommandExecutionError as e:
Log.error(self, "Cert removal failed")
WOFileUtils.rm(self, '/etc/letsencrypt/renewal/{0}_ecc'
.format(domain))
WOFileUtils.rm(self, '/etc/letsencrypt/live/{0}'
.format(domain))
WOFileUtils.rm(self, '/var/www/{0}/conf/nginx/ssl.conf'.format(domain))
WOFileUtils.rm(self, '/var/www/{0}/conf/nginx/ssl.conf'
.format(domain))
WOFileUtils.rm(self, '/var/www/{0}/conf/nginx/ssl.conf.disabled'
.format(domain))
WOFileUtils.rm(
self, '/etc/nginx/conf.d/force-ssl-{0}.conf'.format(domain))
WOFileUtils.rm(
self, '/etc/nginx/conf.d/force-ssl-{0}.conf.disabled'.format(domain))
WOFileUtils.rm(self, '/etc/nginx/conf.d/force-ssl-{0}.conf'
.format(domain))
WOFileUtils.rm(self, '/etc/nginx/conf.d/force-ssl-{0}.conf.disabled'
.format(domain))
updateSiteInfo(self, wo_domain, ssl=False)
WOGit.add(self, ["/etc/letsencrypt"],
msg="Deleted {0} "
.format(domain))