mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-16 18:46:22 +00:00
fix: intentar crear siempre los registros en njalla
This commit is contained in:
parent
42c7e93ac9
commit
bef171d3ac
1 changed files with 5 additions and 5 deletions
|
@ -30,7 +30,7 @@ class DeployDistributedPress < Deploy
|
||||||
time_start
|
time_start
|
||||||
|
|
||||||
create_remote_site! if remote_site_id.blank?
|
create_remote_site! if remote_site_id.blank?
|
||||||
create_njalla_records! if remote_info['njalla'].blank?
|
create_njalla_records!
|
||||||
save
|
save
|
||||||
|
|
||||||
if remote_site_id.blank? || remote_info['njalla'].blank?
|
if remote_site_id.blank? || remote_info['njalla'].blank?
|
||||||
|
@ -134,10 +134,10 @@ class DeployDistributedPress < Deploy
|
||||||
# que eliminarlo.
|
# que eliminarlo.
|
||||||
unless site.name.end_with? '.'
|
unless site.name.end_with? '.'
|
||||||
self.remote_info ||= {}
|
self.remote_info ||= {}
|
||||||
self.remote_info['njalla'] = {}
|
self.remote_info['njalla'] ||= {}
|
||||||
self.remote_info['njalla']['a'] = njalla.add_record(name: site.name, type: 'CNAME', content: "#{Site.domain}.").to_h
|
self.remote_info['njalla']['a'] ||= njalla.add_record(name: site.name, type: 'CNAME', content: "#{Site.domain}.").to_h
|
||||||
self.remote_info['njalla']['cname'] = njalla.add_record(name: "www.#{site.name}", type: 'CNAME', content: "#{Site.domain}.").to_h
|
self.remote_info['njalla']['cname'] ||= njalla.add_record(name: "www.#{site.name}", type: 'CNAME', content: "#{Site.domain}.").to_h
|
||||||
self.remote_info['njalla']['ns'] = njalla.add_record(name: "_dnslink.#{site.name}", type: 'NS', content: "#{publisher.hostname}.").to_h
|
self.remote_info['njalla']['ns'] ||= njalla.add_record(name: "_dnslink.#{site.name}", type: 'NS', content: "#{publisher.hostname}.").to_h
|
||||||
end
|
end
|
||||||
rescue HTTParty::Error => e
|
rescue HTTParty::Error => e
|
||||||
ExceptionNotifier.notify_exception(e, data: { site: site.name })
|
ExceptionNotifier.notify_exception(e, data: { site: site.name })
|
||||||
|
|
Loading…
Reference in a new issue