|
|
@ -1,8 +1,9 @@ |
|
|
|
Admin.create( |
|
|
|
admin = Admin.create( |
|
|
|
:email => 'admin@entrydns.net', |
|
|
|
email: 'admin@entrydns.net', |
|
|
|
:password => 'garlik1', |
|
|
|
password: 'garlik1', |
|
|
|
:password_confirmation => 'garlik1' |
|
|
|
password_confirmation: 'garlik1', |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
admin.update_attribute(:active, true) |
|
|
|
puts 'Admin created' |
|
|
|
puts 'Admin created' |
|
|
|
|
|
|
|
|
|
|
|
# an user for administrative purposes |
|
|
|
# an user for administrative purposes |
|
|
@ -18,7 +19,7 @@ admin.save! |
|
|
|
admin.confirm! |
|
|
|
admin.confirm! |
|
|
|
|
|
|
|
|
|
|
|
Settings.host_domains.each do |name| |
|
|
|
Settings.host_domains.each do |name| |
|
|
|
host_domain = Domain.new(name: name, user_id: admin.id) |
|
|
|
host_domain = admin.domains.build(name: name) |
|
|
|
host_domain.type = 'NATIVE' |
|
|
|
host_domain.type = 'NATIVE' |
|
|
|
host_domain.setup(admin.email) |
|
|
|
host_domain.setup(admin.email) |
|
|
|
host_domain.save! |
|
|
|
host_domain.save! |
|
|
|