HSAdmin Backend Domains, E-Mail, Datenbanken
Peter Hormanns
2019-06-18 13f1552ad232f23fa9e157cc3650a0ca947054aa
fix zonefile
2 files modified
17 ■■■■ changed files
hsarback/src/de/hsadmin/mods/pac/PacProcessorFactory.java 7 ●●●●● patch | view | raw | blame | history
hsarback/src/de/hsadmin/mods/pac/pac-zonefile.vm 10 ●●●● patch | view | raw | blame | history
hsarback/src/de/hsadmin/mods/pac/PacProcessorFactory.java
@@ -140,6 +140,13 @@
    private Processor createZonefileProc(final EntityManager em, final Pac pac) {
        final Map<String, Object> zonefileTemplateVars = new HashMap<String, Object>();
        zonefileTemplateVars.put("sio", Long.toString(System.currentTimeMillis()/1000L));
        zonefileTemplateVars.put("pac", pac.getName());
        zonefileTemplateVars.put("inet4Addr", pac.getCurINetAddr().getInet4Addr());
        try {
            zonefileTemplateVars.put("inet6Addr", pac.getCurINetAddr().getInet6Addr());
        } catch (ProcessorException e) {
            // dont care
        }
        final String domName = pac.getName() + ".hostsharing.net";
        final String zonefileTargetPath = "/etc/bind/pri." + domName;
        final Processor zonefileTemplateProcessor = 
hsarback/src/de/hsadmin/mods/pac/pac-zonefile.vm
@@ -7,9 +7,9 @@
        1H    ; minimum
)
${pac.name}.hostsharing.net.      IN    NS  dns1.hostsharing.net.
${pac.name}.hostsharing.net.      IN    NS  dns2.hostsharing.net.
${pac.name}.hostsharing.net.      IN    NS  dns3.hostsharing.net.
${pac}.hostsharing.net.      IN    NS  dns1.hostsharing.net.
${pac}.hostsharing.net.      IN    NS  dns2.hostsharing.net.
${pac}.hostsharing.net.      IN    NS  dns3.hostsharing.net.
${pac.name}.hostsharing.net.      IN    A    ${pac.curINetAddr.inet4Addr}
${pac.name}.hostsharing.net.      IN    AAAA ${pac.curINetAddr.inet6Addr}
${pac}.hostsharing.net.      IN    A    ${inet4Addr}
${pac}.hostsharing.net.      IN    AAAA ${inet6Addr}