try
This commit is contained in:
parent
30d23dba9a
commit
2d6e13999e
|
@ -117,6 +117,7 @@ if old_gemfile_text != new_gemfile_text
|
|||
end
|
||||
#if %x[ruby -v].scan(/\d\.\d\.\d/)[0] == '2.1.3'
|
||||
install_cmd = 'rvm install 2.1.10 && rvm use default 2.1.10'
|
||||
use_cmd = 'rvm use default 2.1.10'
|
||||
#else
|
||||
# install_cmd = ''
|
||||
#end
|
||||
|
@ -135,7 +136,7 @@ if old_gemfile_text != new_gemfile_text
|
|||
f.puts exist_str
|
||||
}
|
||||
end
|
||||
all_command = "#{install_cmd} ; #{command1} ; #{command2} #{command3} #{command4} ; kill -s TERM `cat tmp/pids/unicorn.pid` ; unset UNICORN_FD ; bundle exec #{unicorn_rails} -c config/unicorn.rb -D -E #{mode}|at now"
|
||||
all_command = "#{install_cmd} ; #{command1} ; #{command2} #{command3} #{command4} "
|
||||
watch_dog_cmd = "watch -n 30 \"unset UNICORN_FD && bundle exec #{unicorn_rails} -c config/unicorn.rb -D -E #{mode}|at now\""
|
||||
#file = File.new(File.join(env_pwd,'bundle_update_background.sh'),"w")
|
||||
#file.write(all_command)
|
||||
|
@ -145,7 +146,7 @@ if old_gemfile_text != new_gemfile_text
|
|||
Bundler.with_clean_env do
|
||||
puts env_pwd
|
||||
puts mode
|
||||
exec("cd #{env_pwd} && env -i HOME=\"$HOME\" bash -l -c \"#{all_command}\" ; screen -d -m -S auto_reopen_#{dir_name} #{watch_dog_cmd} ")
|
||||
exec("cd #{env_pwd} && env -i HOME=\"$HOME\" bash -l -c \"#{all_command}\" ;#{use_cmd}; kill -s TERM `cat tmp/pids/unicorn.pid` ; unset UNICORN_FD ; bundle exec #{unicorn_rails} -c config/unicorn.rb -D -E #{mode}; screen -d -m -S auto_reopen_#{dir_name} #{watch_dog_cmd} ")
|
||||
end
|
||||
end
|
||||
now_priority = Thread.current.priority.to_i
|
||||
|
|
Loading…
Reference in New Issue