HSAdmin Backend Domains, E-Mail, Datenbanken
Peter Hormanns
2017-06-28 b22842eb7db3946a36bba1d5a0eb6d2f13b82a59
remove certs on domain remove
1 files modified
13 ■■■■ changed files
hsarback/src/de/hsadmin/mods/dom/DomainProcessorFactory.java 13 ●●●● patch | view | raw | blame | history
hsarback/src/de/hsadmin/mods/dom/DomainProcessorFactory.java
@@ -79,14 +79,7 @@
        }
        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) {
@@ -325,9 +318,9 @@
                " && rm -f /etc/apache2/pems-enabled/" + domName + ".crt" +
                " && rm -f /etc/apache2/pems-enabled/" + domName + ".key" +
                " && rm -f /etc/apache2/pems-enabled/" + domName + ".chain" +
                " && rm -f /etc/apache2/pems-generated/_." + domName + ".crt" +
                " && rm -f /etc/apache2/pems-generated/_." + domName + ".key" +
                " && rm -f /etc/apache2/pems-generated/_." + domName + ".chain" +
                " && rm -f /etc/apache2/pems-generated/" + domName + ".crt" +
                " && rm -f /etc/apache2/pems-generated/" + domName + ".key" +
                " && rm -f /etc/apache2/pems-generated/" + domName + ".chain" +
                " && rm -rf " + dom.getUser().getHomedir() + "/doms/" + domName +
                " && invoke-rc.d apache2 reload >/dev/null 2>&1");
        return vhostDelProcessor;