HSAdmin Backend Domains, E-Mail, Datenbanken
Peter Hormanns
2012-06-15 8db019e5ebbef132160a1d27bac52789212e12db
Fix bei der Loeschung eines Links in /etc/apache2/sites-enabled
1 files modified
6 ■■■■■ changed files
hsarback/src/de/hsadmin/mods/dom/DomainProcessorFactory.java 6 ●●●●● patch | view | raw | blame | history
hsarback/src/de/hsadmin/mods/dom/DomainProcessorFactory.java
@@ -273,11 +273,13 @@
    private Processor createApacheVHostDeleteProcessor(Domain dom) {
        String domName = dom.getName();
        int level = domName.split("\\.").length;
        String linkPrefix = Integer.toString(100 - level);
        Processor vhostDelProcessor = 
            new ShellProcessor("rm /home/doms/" + domName +
                " && rm -rf " + dom.getUser().getHomedir() + "/doms/" + domName +
                " && rm /etc/apache2/sites-enabled/" + linkPrefix + "-" + domName +
                " && rm /etc/apache2/sites-available/" + domName +
                " && rm /etc/apache2/sites-*/`ls -1 /etc/apache2/sites-enabled/ | egrep \"^[01]+-" + domName + "$\"`" +
                " && rm -rf " + dom.getUser().getHomedir() + "/doms/" + domName +
                " && invoke-rc.d apache2 reload >/dev/null 2>&1");
        return vhostDelProcessor;
    }