fixed #62 : Domain wird aus DNS geloescht

This commit is contained in:
Peter Hormanns 2011-06-16 09:02:01 +00:00
parent 1aec8f7fde
commit 992204c336

View File

@ -168,7 +168,7 @@ public class DomainProcessorFactory implements EntityProcessorFactory {
String domName = dom.getName(); 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 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 = 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" + " && mv /etc/bind/named.pri-zones.tmp /etc/bind/named.pri-zones" +
" && rm /etc/bind/pri." + domName + " && rm /etc/bind/pri." + domName +
" && invoke-rc.d bind9 reload"); " && invoke-rc.d bind9 reload");
@ -178,7 +178,7 @@ public class DomainProcessorFactory implements EntityProcessorFactory {
String[] dnsQueues = { "dns1", "dns2", "dns3" }; String[] dnsQueues = { "dns1", "dns2", "dns3" };
for (String queueName : dnsQueues) { for (String queueName : dnsQueues) {
seczonesFileProcessor = 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" + " && mv /etc/bind/named-hsh.conf.tmp /etc/bind/named-hsh.conf" +
" && rm /var/cache/bind/sec." + domName + " && rm /var/cache/bind/sec." + domName +
" && invoke-rc.d bind9 reload"); " && invoke-rc.d bind9 reload");
@ -204,7 +204,7 @@ public class DomainProcessorFactory implements EntityProcessorFactory {
mainProcessor.appendProcessor(dom.getHiveName(), vhostDelProcessor, "remove apache vhost"); mainProcessor.appendProcessor(dom.getHiveName(), vhostDelProcessor, "remove apache vhost");
Processor backupMXSMTPRelayDelProcessor = 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" + " && mv /etc/postfix/relaydomains.tmp /etc/postfix/relaydomains" +
" && invoke-rc.d postfix reload"); " && invoke-rc.d postfix reload");
mainProcessor.appendProcessor("backupmx", backupMXSMTPRelayDelProcessor, "backupmx.hostsharing.net"); mainProcessor.appendProcessor("backupmx", backupMXSMTPRelayDelProcessor, "backupmx.hostsharing.net");