From 9a55d394f120dbca54d877ca50a6d47c31ff7a7e Mon Sep 17 00:00:00 2001 From: VirtuBox Date: Tue, 30 Apr 2019 16:05:02 +0200 Subject: [PATCH] Add certificate removal --- wo/cli/plugins/site_functions.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/wo/cli/plugins/site_functions.py b/wo/cli/plugins/site_functions.py index 693fbab..f8fa3d9 100644 --- a/wo/cli/plugins/site_functions.py +++ b/wo/cli/plugins/site_functions.py @@ -1221,6 +1221,19 @@ def removeNginxConf(self, domain): .format(domain)) +def removeAcmeConf(self, domain): + if os.path.isdir('/etc/letsencrypt/renewal/{0}_ecc' + .format(domain)): + Log.debug(self, "Removing Acme configuration") + WOFileUtils.rm(self, '/etc/letsencrypt/renewal/{0}_ecc' + .format(domain)) + WOFileUtils.rm(self, '/etc/letsencrypt/live/{0}' + .format(domain)) + WOGit.add(self, ["/etc/letsencrypt"], + msg="Deleted {0} " + .format(domain)) + + def doCleanupAction(self, domain='', webroot='', dbname='', dbuser='', dbhost=''): """