HSAdmin Backend Domains, E-Mail, Datenbanken
836688d00e4b1a42cca5409b65b15bb091961427..a100a21ce2b5826d50e4d19391cfc93aec1ee54d
2020-05-06 Peter Hormanns
clean code
a100a2 diff | tree
2020-05-06 Peter Hormanns
fix get-zonefile command
d2e57c diff | tree
2020-05-06 Peter Hormanns
autoconfig in default domaninoption now
d6bf31 diff | tree
2020-05-06 Peter Hormanns
update initial zonefile for autoconfig
74cceb diff | tree
1 files deleted
2 files modified
40 ■■■■ changed files
hsarback/src/de/hsadmin/mods/dom/DomainModuleImpl.java 3 ●●●● patch | view | raw | blame | history
hsarback/src/de/hsadmin/mods/dom/DomainProcessorFactory.java 7 ●●●● patch | view | raw | blame | history
hsarback/src/de/hsadmin/mods/dom/zonefile.vm 30 ●●●●● patch | view | raw | blame | history
hsarback/src/de/hsadmin/mods/dom/DomainModuleImpl.java
@@ -48,7 +48,8 @@
                    DOMOPT_INDEXES, 
                    DOMOPT_HTDOCSFALLBACK, 
                    DOMOPT_INCLUDES,
                    DOMOPT_LETSENCRYPT
                    DOMOPT_LETSENCRYPT,
                    DOMOPT_AUTOCONFIG
            };
    @Override
hsarback/src/de/hsadmin/mods/dom/DomainProcessorFactory.java
@@ -115,12 +115,9 @@
    }
    private Processor createHiveDNSSetupProcessor(EntityManager em, Domain dom) throws ProcessorException {
        final Map<String, Object> zonefileTemplateVars = new HashMap<String, Object>();
        zonefileTemplateVars.put("sio", Long.toString(System.currentTimeMillis()/1000L));
        final String domName = dom.getName();
        final String zonefileTargetPath = "/etc/bind/pri." + domName;
        final Processor zonefileTemplateProcessor =
            new VelocityProcessor("/de/hsadmin/mods/dom/zonefile.vm", zonefileTemplateVars, dom, zonefileTargetPath, false);
        final Processor getZonefileProcessor = new ShellProcessor("echo \"{DEFAULT_ZONEFILE}\" | /usr/local/sbin/gen-zonefile " + domName + " > " + zonefileTargetPath);
        final Processor zonefileACLProcessor = 
            new ShellProcessor("chown root:bind " + zonefileTargetPath + " && chmod 644 " + zonefileTargetPath);
        final String hiveName = dom.getUser().getHiveName();
@@ -153,7 +150,7 @@
                    "|| ( mv /etc/bind/named.pri-zones.tmp /etc/bind/named.pri-zones && invoke-rc.d bind9 reload )")
        );        
        final Processor dnsSetupProcessor = 
            new CompoundProcessor(zonefileTemplateProcessor, zonefileACLProcessor, prizonesFileProcessor);
            new CompoundProcessor(getZonefileProcessor, zonefileACLProcessor, prizonesFileProcessor);
        return dnsSetupProcessor;
    }
hsarback/src/de/hsadmin/mods/dom/zonefile.vm
File was deleted