mirror of
https://github.com/neocities/neocities.git
synced 2025-04-24 17:22:35 +02:00
Update certs periodically, retry tweaks
This commit is contained in:
parent
2598474596
commit
68399bd76c
1 changed files with 4 additions and 1 deletions
|
@ -43,7 +43,7 @@ class LetsEncryptWorker
|
|||
|
||||
begin
|
||||
puts "WAITING FOR #{domain} VALIDATION"
|
||||
raise VerificationTimeoutError if attempts == 30
|
||||
raise VerificationTimeoutError if attempts == 5
|
||||
raise NotAuthorizedYetError if challenge.verify_status != 'valid'
|
||||
rescue NotAuthorizedYetError
|
||||
sleep 5
|
||||
|
@ -60,5 +60,8 @@ class LetsEncryptWorker
|
|||
site.ssl_cert = certificate.fullchain_to_pem
|
||||
site.save_changes validate: false
|
||||
FileUtils.rm_rf File.join(site.base_files_path, '.well-known')
|
||||
|
||||
# Refresh the cert periodically, current expire time is 90 days
|
||||
LetsEncryptWorker.perform_in 60.days, site.id
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue