Browse Source

NS3 new nameserver

pull/1/head
Nicolae Claudius 13 years ago
parent
commit
5727b5fc0c
  1. 10
      app/models/domain.rb
  2. 2
      config/settings.sample.yml

10
app/models/domain.rb

@ -13,7 +13,7 @@ class Domain < ActiveRecord::Base
cattr_reader :types
@@types = ['NATIVE', 'MASTER', 'SLAVE', 'SUPERSLAVE']
has_one :soa_record,
has_one :soa_record,
:class_name => 'SOA',
:conditions => {:type => 'SOA'},
:inverse_of => :domain
@ -110,9 +110,11 @@ class Domain < ActiveRecord::Base
soa.contact ||= email
ns_records.build
ns_records.build
ns1, ns2 = ns_records
ns_records.build
ns_records.build
ns1, ns2, ns3 = ns_records
ns1.content = Settings.ns.first
ns2.content = (Settings.ns - [ns1.content]).sample
ns2.content = Settings.ns.second
ns3.content = Settings.ns.third
end
end

2
config/settings.sample.yml

@ -3,7 +3,7 @@ min_ttl: 60
ns:
- ns1.entrydns.net
- ns2.entrydns.net
# - ns3.entrydns.net
- ns3.entrydns.net
# - ns4.entrydns.net
default_prio: 10
host_domains:

Loading…
Cancel
Save