update initial zonefile for autoconfig
This commit is contained in:
parent
836688d00e
commit
74cceb3564
@ -119,10 +119,14 @@ public class DomainProcessorFactory implements EntityProcessorFactory {
|
|||||||
zonefileTemplateVars.put("sio", Long.toString(System.currentTimeMillis()/1000L));
|
zonefileTemplateVars.put("sio", Long.toString(System.currentTimeMillis()/1000L));
|
||||||
final String domName = dom.getName();
|
final String domName = dom.getName();
|
||||||
final String zonefileTargetPath = "/etc/bind/pri." + domName;
|
final String zonefileTargetPath = "/etc/bind/pri." + domName;
|
||||||
final Processor zonefileTemplateProcessor =
|
// final Processor zonefileTemplateProcessor =
|
||||||
new VelocityProcessor("/de/hsadmin/mods/dom/zonefile.vm", zonefileTemplateVars, dom, zonefileTargetPath, false);
|
// 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 > " + zonefileTargetPath);
|
||||||
|
|
||||||
final Processor zonefileACLProcessor =
|
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 String hiveName = dom.getUser().getHiveName();
|
||||||
final Query domsQuery = em.createQuery("SELECT d FROM Domains d WHERE d.user.pac.hive.name = :hivename");
|
final Query domsQuery = em.createQuery("SELECT d FROM Domains d WHERE d.user.pac.hive.name = :hivename");
|
||||||
domsQuery.setParameter("hivename", hiveName);
|
domsQuery.setParameter("hivename", hiveName);
|
||||||
@ -153,7 +157,7 @@ public class DomainProcessorFactory implements EntityProcessorFactory {
|
|||||||
"|| ( mv /etc/bind/named.pri-zones.tmp /etc/bind/named.pri-zones && invoke-rc.d bind9 reload )")
|
"|| ( mv /etc/bind/named.pri-zones.tmp /etc/bind/named.pri-zones && invoke-rc.d bind9 reload )")
|
||||||
);
|
);
|
||||||
final Processor dnsSetupProcessor =
|
final Processor dnsSetupProcessor =
|
||||||
new CompoundProcessor(zonefileTemplateProcessor, zonefileACLProcessor, prizonesFileProcessor);
|
new CompoundProcessor(getZonefileProcessor, zonefileACLProcessor, prizonesFileProcessor);
|
||||||
return dnsSetupProcessor;
|
return dnsSetupProcessor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user