fixed #62 : Domain wird aus DNS geloescht

This commit is contained in:
Peter Hormanns 2011-06-16 10:17:52 +00:00
parent b5f9cf819e
commit 4947511bde

View File

@ -166,7 +166,7 @@ public class DomainProcessorFactory implements EntityProcessorFactory {
public <T extends AbstractEntity> Processor createDeleteProcessor(EntityManager em, T entity) {
Domain dom = (Domain) entity;
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 + "\\s'|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" +
" && mv /etc/bind/named.pri-zones.tmp /etc/bind/named.pri-zones" +