fix error

This commit is contained in:
邱博亞 2021-02-19 17:29:52 +08:00
parent 9263290fee
commit 384b6c1256
2 changed files with 1 additions and 1 deletions

View File

@ -132,6 +132,7 @@ class Admin::SitePanelController < OrbitAdminController
@site = SiteConstruct.find(params[:id])
render 'see_detail_for_created_site' and return
elsif params[:type] == 'change_server_name'
SiteConstruct.find(params[:id]).update_attributes(domain_name: params[:site_construct][:domain_name])
cmd = "bundle exec rake create_site:change_site_server_name[#{params[:id]},'#{params[:site_construct][:domain_name]}']"
Thread.new do
system(cmd)

View File

@ -16,7 +16,6 @@ namespace :create_site do
exec_command_by_user(ssh,cmd)
exec_ssh_command_by_sudo(ssh,"service nginx restart")
end
site_construct.update_attributes(domain_name: args.server_name)
end
rescue => e
puts [e,e.backtrace]