5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-19 10:16:22 +00:00

Merge branch 'issue-10464' into panel.sutty.nl
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
f 2023-03-27 14:12:23 -03:00
commit 224b0de78d

View file

@ -30,7 +30,7 @@ class DeployDistributedPress < Deploy
time_start
create_remote_site! if remote_site_id.blank?
create_njalla_records! if remote_info['njalla'].blank?
create_njalla_records!
save
if remote_site_id.blank? || remote_info['njalla'].blank?
@ -136,9 +136,10 @@ class DeployDistributedPress < Deploy
# que eliminarlo.
unless site.name.end_with? '.'
self.remote_info ||= {}
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']['ns'] = njalla.add_record(name: "_dnslink.#{site.name}", type: 'NS', content: "#{publisher.hostname}.").to_h
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']['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
end
rescue HTTParty::Error => e
ExceptionNotifier.notify_exception(e, data: { site: site.name })