mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-12 00:06:09 +01:00
pdns replication
This commit is contained in:
@@ -9,7 +9,7 @@ import subprocess
|
||||
import shlex
|
||||
from dns.models import Domains,Records
|
||||
from processUtilities import ProcessUtilities
|
||||
from manageServices.models import PDNSStatus
|
||||
from manageServices.models import PDNSStatus, SlaveServers
|
||||
|
||||
class DNS:
|
||||
|
||||
@@ -49,6 +49,39 @@ class DNS:
|
||||
|
||||
zone.save()
|
||||
|
||||
record = Records(domainOwner=zone,
|
||||
domain_id=zone.id,
|
||||
name=topLevelDomain,
|
||||
type="NS",
|
||||
content='hostmaster.%s' % (topLevelDomain),
|
||||
ttl=3600,
|
||||
prio=0,
|
||||
disabled=0,
|
||||
auth=1)
|
||||
record.save()
|
||||
|
||||
record = Records(domainOwner=zone,
|
||||
domain_id=zone.id,
|
||||
name=topLevelDomain,
|
||||
type="NS",
|
||||
content='ns1.%s' % (topLevelDomain),
|
||||
ttl=3600,
|
||||
prio=0,
|
||||
disabled=0,
|
||||
auth=1)
|
||||
record.save()
|
||||
|
||||
record = Records(domainOwner=zone,
|
||||
domain_id=zone.id,
|
||||
name=topLevelDomain,
|
||||
type="NS",
|
||||
content='ns2.%s' % (topLevelDomain),
|
||||
ttl=3600,
|
||||
prio=0,
|
||||
disabled=0,
|
||||
auth=1)
|
||||
record.save()
|
||||
|
||||
content = "ns1." + topLevelDomain + " hostmaster." + topLevelDomain + " 1 10800 3600 604800 3600"
|
||||
|
||||
soaRecord = Records(domainOwner=zone,
|
||||
|
||||
Reference in New Issue
Block a user