remove certs on domain remove
This commit is contained in:
parent
2e61e4c94f
commit
5de9f974d1
@ -79,9 +79,16 @@ public class DomainProcessorFactory implements EntityProcessorFactory {
|
|||||||
}
|
}
|
||||||
mainProcessor.appendProcessor(dom.getHiveName(), createApacheVHostDeleteProcessor(dom), "remove apache vhost");
|
mainProcessor.appendProcessor(dom.getHiveName(), createApacheVHostDeleteProcessor(dom), "remove apache vhost");
|
||||||
mainProcessor.appendProcessor(dom.getHiveName(), createACMEBotProcessor(em, dom), "remove letsencrypt config");
|
mainProcessor.appendProcessor(dom.getHiveName(), createACMEBotProcessor(em, dom), "remove letsencrypt config");
|
||||||
|
mainProcessor.appendProcessor(dom.getHiveName(), createRemoveCertsProcessor(dom), "remove letsencrypt certs");
|
||||||
return mainProcessor;
|
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) {
|
private Processor createDNSServerConfigProcessor(EntityManager em) {
|
||||||
Query query = em.createQuery("SELECT d FROM Domains d");
|
Query query = em.createQuery("SELECT d FROM Domains d");
|
||||||
HashMap<String, Object> templateVars = new HashMap<String, Object>();
|
HashMap<String, Object> templateVars = new HashMap<String, Object>();
|
||||||
|
Loading…
Reference in New Issue
Block a user