From 992204c3369690722b89c6cde49cbe2b1214ce15 Mon Sep 17 00:00:00 2001 From: Peter Hormanns Date: Thu, 16 Jun 2011 09:02:01 +0000 Subject: [PATCH] fixed #62 : Domain wird aus DNS geloescht --- .../src/de/hsadmin/mods/dom/DomainProcessorFactory.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hsarback/src/de/hsadmin/mods/dom/DomainProcessorFactory.java b/hsarback/src/de/hsadmin/mods/dom/DomainProcessorFactory.java index 80671b8..ce2e137 100644 --- a/hsarback/src/de/hsadmin/mods/dom/DomainProcessorFactory.java +++ b/hsarback/src/de/hsadmin/mods/dom/DomainProcessorFactory.java @@ -168,7 +168,7 @@ public class DomainProcessorFactory implements EntityProcessorFactory { 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 @@ public class DomainProcessorFactory implements EntityProcessorFactory { 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 @@ public class DomainProcessorFactory implements EntityProcessorFactory { 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");