diff --git a/hsarback/src/de/hsadmin/mods/dom/DomainProcessorFactory.java b/hsarback/src/de/hsadmin/mods/dom/DomainProcessorFactory.java index 4d2d023..7aaece7 100644 --- a/hsarback/src/de/hsadmin/mods/dom/DomainProcessorFactory.java +++ b/hsarback/src/de/hsadmin/mods/dom/DomainProcessorFactory.java @@ -79,9 +79,16 @@ public class DomainProcessorFactory implements EntityProcessorFactory { } mainProcessor.appendProcessor(dom.getHiveName(), createApacheVHostDeleteProcessor(dom), "remove apache vhost"); mainProcessor.appendProcessor(dom.getHiveName(), createACMEBotProcessor(em, dom), "remove letsencrypt config"); + mainProcessor.appendProcessor(dom.getHiveName(), createRemoveCertsProcessor(dom), "remove letsencrypt certs"); return mainProcessor; } + private ShellProcessor createRemoveCertsProcessor(Domain dom) { + return new ShellProcessor("rm -f /etc/apache2/pems-generated/" + dom.getName() + ".crt && " + + "rm -f /etc/apache2/pems-generated/" + dom.getName() + ".key && " + + "rm -f /etc/apache2/pems-generated/" + dom.getName() + ".chain "); + } + private Processor createDNSServerConfigProcessor(EntityManager em) { Query query = em.createQuery("SELECT d FROM Domains d"); HashMap templateVars = new HashMap();