Fix bug.
This commit is contained in:
parent
6061d0a5f3
commit
6161a1a004
|
@ -67,7 +67,7 @@ namespace :create_site do
|
||||||
exec_ssh_command_by_sudo_for_create(ssh,"sudo -p 'sudo password:' chmod 777 #{args.path}/#{@site_construct.get_site_name} -R")
|
exec_ssh_command_by_sudo_for_create(ssh,"sudo -p 'sudo password:' chmod 777 #{args.path}/#{@site_construct.get_site_name} -R")
|
||||||
db_setting_text = ssh.exec!("cat #{args.path}/#{args.site_name}/config/mongoid.yml")
|
db_setting_text = ssh.exec!("cat #{args.path}/#{args.site_name}/config/mongoid.yml")
|
||||||
update_infos("setting dbname to #{args.db_name}")
|
update_infos("setting dbname to #{args.db_name}")
|
||||||
exec_ssh_command_by_sudo_for_create(ssh,"sh -c \"echo '#{db_setting_text.gsub(template_site.db_name,args.db_name)}' > #{args.path}/#{@site_construct.get_site_name}/config/mongoid.yml\"",true)
|
exec_ssh_command_by_sudo_for_create(ssh,"sh -c \"echo '#{db_setting_text.gsub(/database: .+/,"database: "+args.db_name)}' > #{args.path}/#{@site_construct.get_site_name}/config/mongoid.yml\"",true)
|
||||||
unless args.only_copy_installed_module == true || args.only_copy_installed_module == "true"
|
unless args.only_copy_installed_module == true || args.only_copy_installed_module == "true"
|
||||||
update_infos("copying db from #{template_site.db_name} to #{args.db_name}")
|
update_infos("copying db from #{template_site.db_name} to #{args.db_name}")
|
||||||
if @site_construct.server_type == template_site.server_type
|
if @site_construct.server_type == template_site.server_type
|
||||||
|
|
Loading…
Reference in New Issue