Fix bug.
This commit is contained in:
parent
f3c6d82693
commit
21f9e32d0d
|
@ -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")
|
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))
|
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)}
|
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.source_paths = [crt_file_path,private_key_path]
|
||||||
site_cert.is_certbot = private_key_path.include?("letsencrypt")
|
site_cert.is_certbot = private_key_path.include?("letsencrypt")
|
||||||
site_cert.save
|
site_cert.save
|
||||||
|
|
Loading…
Reference in New Issue