From 21f9e32d0db1bc3afe5d6a4c48be8c52d318a8bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B1=E5=8D=9A=E4=BA=9E?= Date: Thu, 9 May 2024 07:56:25 +0800 Subject: [PATCH] Fix bug. --- lib/tasks/detect_sites.rake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tasks/detect_sites.rake b/lib/tasks/detect_sites.rake index b56f080..e464164 100644 --- a/lib/tasks/detect_sites.rake +++ b/lib/tasks/detect_sites.rake @@ -152,7 +152,7 @@ namespace :create_site do private_key_content = exec_ssh_command_by_sudo_and_see_output(ssh,"cat #{private_key_path}",false).select{|s| s.present?}.join("\n").strip.split(/(\r\n|\n)/).select{|s| s.present?}.join("\n") FileUtils.mkdir_p(File.dirname(private_key_store_path)) unless Dir.exist?(File.dirname(private_key_store_path)) File.open(private_key_store_path,'w+'){|f| f.write(private_key_content)} - site_cert.private_key.retrieve_from_store!(File.basename(private_key_path)) + site_cert.private_key.retrieve_from_store!(File.basename(private_key_store_path)) site_cert.source_paths = [crt_file_path,private_key_path] site_cert.is_certbot = private_key_path.include?("letsencrypt") site_cert.save