HSAdmin Backend Domains, E-Mail, Datenbanken
Peter Hormanns
2012-11-14 f60df1baeb8389a8a99b97dc2f6695a3f58f8bec
use hive-inetaddr instead pf pac-inetaddr in namend-hsh.conf
1 files modified
8 ■■■■ changed files
hsarback/src/de/hsadmin/mods/dom/DomainProcessorFactory.java 8 ●●●● patch | view | raw | blame | history
hsarback/src/de/hsadmin/mods/dom/DomainProcessorFactory.java
@@ -53,10 +53,10 @@
        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, dom, pac), queueName + ".hostsharing.net");
@@ -157,10 +157,10 @@
        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");