use hive-inetaddr instead pf pac-inetaddr in namend-hsh.conf

This commit is contained in:
Peter Hormanns 2012-11-14 11:39:59 +01:00
parent dbef80b91f
commit a7a3bafcdc

View File

@ -53,10 +53,10 @@ public class DomainProcessorFactory implements EntityProcessorFactory {
templateVars.put("DOM_IPNUMBEREX", getOldIPAddress(pac));
WaitingTasksProcessor mainProcessor = new WaitingTasksProcessor(createHiveDNSSetupProcessor(domName, templateVars));
mainProcessor.appendProcessor(hiveName, createHiveEMailSetupProcessor(em, domName), "Setup EMail");
String pacInetAddr = pac.getCurINetAddr().getInetAddr();
String hiveInetAddr = pac.getHive().getInetAddr().getInetAddr();
Config config = Config.getInstance();
for (String queueName : config.getProperty("queues.dns").split(",")) {
mainProcessor.appendProcessor(queueName, createDNSServerSetupProcessor(domName, pacInetAddr), queueName + ".hostsharing.net");
mainProcessor.appendProcessor(queueName, createDNSServerSetupProcessor(domName, hiveInetAddr), queueName + ".hostsharing.net");
}
for (String queueName : config.getProperty("queues.mail").split(",")) {
mainProcessor.appendProcessor(queueName, createMailinSetupProcessor(em, domName, pac), queueName + ".hostsharing.net");
@ -158,10 +158,10 @@ public class DomainProcessorFactory implements EntityProcessorFactory {
return emailAdrProcessor;
}
private Processor createDNSServerSetupProcessor(String domName, String pacInetAddr) {
private Processor createDNSServerSetupProcessor(String domName, String hiveInetAddr) {
Processor seczonesFileProcessor;
seczonesFileProcessor =
new ShellProcessor("echo 'zone \"" + domName + "\" { type slave; file \"sec." + domName + "\"; masters { " + pacInetAddr + "; }; };' >>/etc/bind/named-hsh.conf" +
new ShellProcessor("echo 'zone \"" + domName + "\" { type slave; file \"sec." + domName + "\"; masters { " + hiveInetAddr + "; }; };' >>/etc/bind/named-hsh.conf" +
" && sort /etc/bind/named-hsh.conf | uniq >/etc/bind/named-hsh.conf.tmp" +
" && mv /etc/bind/named-hsh.conf.tmp /etc/bind/named-hsh.conf" +
" && invoke-rc.d bind9 reload");