Fix bug.
This commit is contained in:
parent
29c9fb0205
commit
1bc20e2067
|
@ -33,7 +33,7 @@ namespace :create_site do
|
|||
Net::SSH.start(site_server.ip , site_server.account , password: site_server.password) do |ssh|
|
||||
if tmp_is_certbot || (@site_cert.is_certbot rescue false)
|
||||
domain_names = site_constructs.flat_map{|site_construct| site_construct.domain_name.strip.split(" ")}.select{|d| d.present? && d.match(/^[\d\.]+$/).nil?}
|
||||
domain_names = domain_names.select{|d| `dig #{d} +short`.strip == site_server.ip}
|
||||
domain_names = domain_names.select{|d| `dig #{d} +short`.split("\n").select{|s| s.strip == site_server.ip}.count != 0}
|
||||
if domain_names.count != 0
|
||||
certbot_path = exec_ssh_command_by_sudo_and_see_output(ssh,"bash -l -c 'which certbot certbot-auto'",false,true).strip.split("\n")[0]
|
||||
if certbot_path.present?
|
||||
|
|
Loading…
Reference in New Issue