HSAdmin Backend Domains, E-Mail, Datenbanken
Peter Hormanns
2017-06-28 5de9f974d18d927485dd2a5943284561b14882ff
remove certs on domain remove
1 files modified
7 ■■■■■ changed files
hsarback/src/de/hsadmin/mods/dom/DomainProcessorFactory.java 7 ●●●●● patch | view | raw | blame | history
hsarback/src/de/hsadmin/mods/dom/DomainProcessorFactory.java
@@ -79,9 +79,16 @@
        }
        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<String, Object> templateVars = new HashMap<String, Object>();