diff --git a/app/models/concerns/zone/whois_queryable.rb b/app/models/concerns/zone/whois_queryable.rb index fe5da8ffb1..e0e2c41a57 100644 --- a/app/models/concerns/zone/whois_queryable.rb +++ b/app/models/concerns/zone/whois_queryable.rb @@ -34,7 +34,7 @@ def generate_json def domain_vars { disclaimer: Setting.registry_whois_disclaimer, name: origin, - registered: created_at.try(:to_s, :iso8601), status: ['ok (paid and in zone)'], + registered: created_at.try(:to_s, :iso8601), status: ['Blocked'], changed: updated_at.try(:to_s, :iso8601), email: Setting.registry_email, admin_contacts: [contact_vars], tech_contacts: [contact_vars], nameservers: nameserver_vars, dnssec_keys: [], diff --git a/lib/tasks/whois.rake b/lib/tasks/whois.rake index bbec1f8346..03ba3a5208 100644 --- a/lib/tasks/whois.rake +++ b/lib/tasks/whois.rake @@ -43,4 +43,9 @@ namespace :whois do end puts "\n-----> all done in #{(Time.zone.now.to_f - start).round(2)} seconds" end + + desc 'Update whois status records for zones' + task update_zone_statuses: :environment do + DNS::Zone.all.each(&:generate_data) + end end