dns master is hive
This commit is contained in:
parent
174c0a7706
commit
9db05ea509
@ -95,7 +95,6 @@ public class DomainModuleImpl extends AbstractModuleImpl {
|
||||
Domain dom = (Domain) newEntity;
|
||||
Date now = new Date();
|
||||
dom.setSince(now);
|
||||
dom.setDnsMaster("dns.hostsharing.net");
|
||||
if (dom.getName() == null || dom.getName().length() == 0) {
|
||||
throw new HSAdminException("domain name required");
|
||||
}
|
||||
@ -108,10 +107,13 @@ public class DomainModuleImpl extends AbstractModuleImpl {
|
||||
userQuery.setParameter("username", admin.getName());
|
||||
admin = (UnixUser) userQuery.getSingleResult();
|
||||
//TODO: Needs better implementation
|
||||
String pacType = admin.getPac().getBasepac().getName();
|
||||
final Pac pac = admin.getPac();
|
||||
String pacType = pac.getBasepac().getName();
|
||||
if (!pacType.equals(BasePacType.PAC_WEB) && !pacType.equals(BasePacType.PAC_DW) && !pacType.equals(BasePacType.PAC_SW)) {
|
||||
throw new HSAdminException("not allowed for this packet type");
|
||||
}
|
||||
}
|
||||
final String hiveName = pac.getHive().getHiveName();
|
||||
dom.setDnsMaster(hiveName + ".hostsharing.net");
|
||||
// Standard domainoptions setzen. TODO: Alle defaults über eigene Klasse aus der Datenbank holen.
|
||||
UnixUser loginUser = getTransaction().getLoginUser();
|
||||
if (!loginUser.hasHostmasterRole()) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
$TTL 6H
|
||||
${dom.name}. IN SOA ${hive.name}.hostsharing.net. hostmaster.hostsharing.net. (
|
||||
${dom.name}. IN SOA ${dom.dnsMaster}.hostsharing.net. hostmaster.hostsharing.net. (
|
||||
${sio} ; serial secs since Jan 1 1970
|
||||
6H ; refresh (>=10000)
|
||||
1H ; retry (>=1800)
|
||||
|
Loading…
Reference in New Issue
Block a user