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