fix zonefile
This commit is contained in:
parent
54139ec1f5
commit
13f1552ad2
@ -140,6 +140,13 @@ public class PacProcessorFactory implements EntityProcessorFactory {
|
|||||||
private Processor createZonefileProc(final EntityManager em, final Pac pac) {
|
private Processor createZonefileProc(final EntityManager em, final Pac pac) {
|
||||||
final Map<String, Object> zonefileTemplateVars = new HashMap<String, Object>();
|
final Map<String, Object> zonefileTemplateVars = new HashMap<String, Object>();
|
||||||
zonefileTemplateVars.put("sio", Long.toString(System.currentTimeMillis()/1000L));
|
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 domName = pac.getName() + ".hostsharing.net";
|
||||||
final String zonefileTargetPath = "/etc/bind/pri." + domName;
|
final String zonefileTargetPath = "/etc/bind/pri." + domName;
|
||||||
final Processor zonefileTemplateProcessor =
|
final Processor zonefileTemplateProcessor =
|
||||||
|
@ -7,9 +7,9 @@ ${pac.name}.hostsharing.net. IN SOA ${hive}.hostsharing.net. hostmaster.hostshar
|
|||||||
1H ; minimum
|
1H ; minimum
|
||||||
)
|
)
|
||||||
|
|
||||||
${pac.name}.hostsharing.net. IN NS dns1.hostsharing.net.
|
${pac}.hostsharing.net. IN NS dns1.hostsharing.net.
|
||||||
${pac.name}.hostsharing.net. IN NS dns2.hostsharing.net.
|
${pac}.hostsharing.net. IN NS dns2.hostsharing.net.
|
||||||
${pac.name}.hostsharing.net. IN NS dns3.hostsharing.net.
|
${pac}.hostsharing.net. IN NS dns3.hostsharing.net.
|
||||||
|
|
||||||
${pac.name}.hostsharing.net. IN A ${pac.curINetAddr.inet4Addr}
|
${pac}.hostsharing.net. IN A ${inet4Addr}
|
||||||
${pac.name}.hostsharing.net. IN AAAA ${pac.curINetAddr.inet6Addr}
|
${pac}.hostsharing.net. IN AAAA ${inet6Addr}
|
||||||
|
Loading…
Reference in New Issue
Block a user