mirror of
https://github.com/neocities/neocities.git
synced 2025-04-25 01:32:36 +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
|
begin
|
||||||
puts "WAITING FOR #{domain} VALIDATION"
|
puts "WAITING FOR #{domain} VALIDATION"
|
||||||
raise VerificationTimeoutError if attempts == 30
|
raise VerificationTimeoutError if attempts == 5
|
||||||
raise NotAuthorizedYetError if challenge.verify_status != 'valid'
|
raise NotAuthorizedYetError if challenge.verify_status != 'valid'
|
||||||
rescue NotAuthorizedYetError
|
rescue NotAuthorizedYetError
|
||||||
sleep 5
|
sleep 5
|
||||||
|
@ -60,5 +60,8 @@ class LetsEncryptWorker
|
||||||
site.ssl_cert = certificate.fullchain_to_pem
|
site.ssl_cert = certificate.fullchain_to_pem
|
||||||
site.save_changes validate: false
|
site.save_changes validate: false
|
||||||
FileUtils.rm_rf File.join(site.base_files_path, '.well-known')
|
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
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue