21
1
Fork 0
mirror of https://github.com/Evolix/chexpire.git synced 2024-05-06 18:48:38 +02:00
chexpire/lib/tasks/checks.rake
2018-08-29 12:19:05 +02:00

29 lines
879 B
Ruby

# Copyright (C) 2018 Colin Darie <colin@darie.eu>, 2018 Evolix <info@evolix.fr>
# License: GNU AGPL-3+ (see full text in LICENSE file)
namespace :checks do
namespace :sync_dates do
task all: [:domain, :ssl]
desc "Refresh domains expiry dates"
task domain: :environment do
logger = Logging.logger(STDOUT)
logger.level = :warn
configuration = Rails.configuration.chexpire.fetch("checks_domain")
process = CheckDomainProcessor.new(logger: logger, configuration: configuration)
process.sync_dates
end
desc "Refresh SSL expiry dates"
task ssl: :environment do
logger = Logging.logger(STDOUT)
logger.level = :warn
configuration = Rails.configuration.chexpire.fetch("checks_ssl")
process = CheckSSLProcessor.new(logger: logger, configuration: configuration)
process.sync_dates
end
end
end