Fix bug.
This commit is contained in:
parent
66412d3e40
commit
baf9e093c6
|
@ -52,7 +52,7 @@ namespace :create_site do
|
||||||
nginx_include_dir = nginx_include_dir.gsub(/include|;|\n/,'').strip
|
nginx_include_dir = nginx_include_dir.gsub(/include|;|\n/,'').strip
|
||||||
domain_name = @site_server.domain_name#'serv.rulingcom.com'
|
domain_name = @site_server.domain_name#'serv.rulingcom.com'
|
||||||
server_names = exec_command_by_user(ssh,"grep -H 'server_name' -r #{nginx_include_dir}")
|
server_names = exec_command_by_user(ssh,"grep -H 'server_name' -r #{nginx_include_dir}")
|
||||||
server_names_array = server_names.scan(/(.*):[ \t]*server_name[ \t]+(.*);/)
|
server_names_array = server_names.scan(/(.*):[ \t]*server_name[ \t]+([^;]+);/)
|
||||||
server_names_array = server_names_array.group_by{|v| v[0]}
|
server_names_array = server_names_array.group_by{|v| v[0]}
|
||||||
|
|
||||||
server_names_array.each do |nginx_file, server_name_with_file|
|
server_names_array.each do |nginx_file, server_name_with_file|
|
||||||
|
|
Loading…
Reference in New Issue