From bb35c3ee109594b4cfaaf525ae0403b2d62a2b4a Mon Sep 17 00:00:00 2001 From: Bohung Date: Wed, 14 Apr 2021 19:57:06 +0800 Subject: [PATCH] Fix bug. --- lib/tasks/exec_command.rake | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/tasks/exec_command.rake b/lib/tasks/exec_command.rake index a086845..3bf992f 100644 --- a/lib/tasks/exec_command.rake +++ b/lib/tasks/exec_command.rake @@ -60,6 +60,7 @@ namespace :exec_commands do if args.rails_env.present? rails_env = args.rails_env end + @site_construct.update(:rails_env=>rails_env) update_infos_for_exec("starting site to #{rails_env}") outputs = exec_ssh_command_by_sudo_and_see_output(ssh,"sudo -p 'sudo password:' chmod 777 #{@site_construct.path}/#{@site_construct.site_name} -R",false) output = exec_ssh_command_by_sudo_and_see_output(ssh,"bash -l -c 'cd #{@site_construct.path}/#{@site_construct.site_name}\nkill -s TERM `fuser tmp/unicorn.sock`\nsudo -p \"sudo password:\" kill -s TERM `sudo -p \"sudo password:\" fuser tmp/unicorn.sock`\nsudo -p \"sudo password:\" rm -f tmp/pids/unicorn.pid\nbundle exec unicorn_rails -c config/unicorn.rb -D -E #{rails_env}\n'",false)