HSAdmin Backend Domains, E-Mail, Datenbanken
Peter Hormanns
2011-06-16 992204c3369690722b89c6cde49cbe2b1214ce15
fixed #62 : Domain wird aus DNS geloescht
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
@@ -168,7 +168,7 @@
        String domName = dom.getName();
        ShellProcessor emailAddressRemoveProcessor = new ShellProcessor("for KEY in $(postmap -s /etc/postfix/virtual|grep " + domName + "|cut -f1); do postmap -d $KEY /etc/postfix/virtual; done");
        ShellProcessor dnsRemoveRemoveProcessor = 
            new ShellProcessor("grep -v pri." + domName + " /etc/bind/named.pri-zones > /etc/bind/named.pri-zones.tmp" +
            new ShellProcessor("grep -v '\"pri." + domName + "\"' /etc/bind/named.pri-zones > /etc/bind/named.pri-zones.tmp" +
                " && mv /etc/bind/named.pri-zones.tmp /etc/bind/named.pri-zones" +
                " && rm /etc/bind/pri." + domName +
                " && invoke-rc.d bind9 reload");
@@ -178,7 +178,7 @@
        String[] dnsQueues = { "dns1", "dns2", "dns3" }; 
        for (String queueName : dnsQueues) {
            seczonesFileProcessor =
                new ShellProcessor("grep -v sec." + domName + " /etc/bind/named-hsh.conf >/etc/bind/named-hsh.conf.tmp" +
                new ShellProcessor("grep -v '\"sec." + domName + "\"' /etc/bind/named-hsh.conf >/etc/bind/named-hsh.conf.tmp" +
                        " && mv /etc/bind/named-hsh.conf.tmp /etc/bind/named-hsh.conf" +
                        " && rm /var/cache/bind/sec." + domName + 
                        " && invoke-rc.d bind9 reload");
@@ -204,7 +204,7 @@
        mainProcessor.appendProcessor(dom.getHiveName(), vhostDelProcessor, "remove apache vhost");
        
        Processor backupMXSMTPRelayDelProcessor = 
            new ShellProcessor("grep -v " + domName + " /etc/postfix/relaydomains > /etc/postfix/relaydomains.tmp" +
            new ShellProcessor("grep -v '^" + domName + "$' /etc/postfix/relaydomains > /etc/postfix/relaydomains.tmp" +
                " && mv /etc/postfix/relaydomains.tmp /etc/postfix/relaydomains" +
                " && invoke-rc.d postfix reload");
        mainProcessor.appendProcessor("backupmx", backupMXSMTPRelayDelProcessor, "backupmx.hostsharing.net");