HSAdmin Backend Domains, E-Mail, Datenbanken
Peter Hormanns
2020-05-06 a100a21ce2b5826d50e4d19391cfc93aec1ee54d
clean code
1 files modified
1 files deleted
39 ■■■■■ changed files
hsarback/src/de/hsadmin/mods/dom/DomainProcessorFactory.java 9 ●●●● 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/DomainProcessorFactory.java
@@ -115,18 +115,11 @@
    }
    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);
            new ShellProcessor("chown root:bind " + zonefileTargetPath + " && chmod 644 " + zonefileTargetPath);
        final String hiveName = dom.getUser().getHiveName();
        final Query domsQuery = em.createQuery("SELECT d FROM Domains d WHERE d.user.pac.hive.name = :hivename");    
        domsQuery.setParameter("hivename", hiveName);
hsarback/src/de/hsadmin/mods/dom/zonefile.vm
File was deleted