diff --git a/lib/tasks/change_site_cert.rake b/lib/tasks/change_site_cert.rake index 3a6fab6..f9cb279 100644 --- a/lib/tasks/change_site_cert.rake +++ b/lib/tasks/change_site_cert.rake @@ -37,7 +37,7 @@ namespace :create_site do 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`.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] + certbot_path = exec_ssh_command_by_sudo_and_see_output(ssh,"bash -l -c 'which certbot certbot-auto'",false,true).strip.split("\n")[0].strip() if certbot_path.present? auto_update_infos("Using certbot to update cert setting...") if site_constructs.count > 1