mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 17:06:31 -06:00
Use FuleUtils.mkdir_p for cleaner code
This commit is contained in:
parent
4fe6bee83c
commit
b1fcd523c6
@ -45,10 +45,8 @@ Bluepill.application("discourse", :base_dir => ENV["HOME"] + '/.bluepill') do |a
|
|||||||
app.uid = user
|
app.uid = user
|
||||||
|
|
||||||
app.working_dir = rails_root
|
app.working_dir = rails_root
|
||||||
tmpdir = "#{rails_root}/tmp"
|
sockdir = "#{rails_root}/tmp/sockets"
|
||||||
sockdir = "#{tmpdir}/sockets"
|
File.directory? sockdir or FileUtils.mkdir_p sockdir
|
||||||
File.directory? tmpdir or Dir.mkdir tmpdir
|
|
||||||
File.directory? sockdir or Dir.mkdir sockdir
|
|
||||||
num_webs.times do |i|
|
num_webs.times do |i|
|
||||||
app.process("thin-#{i}") do |process|
|
app.process("thin-#{i}") do |process|
|
||||||
process.start_command = "bundle exec thin start -e production -t 0 --socket #{sockdir}/thin.#{i}.sock --pid #{rails_root}/tmp/pids/thin#{i}.pid --log #{rails_root}/log/thin-#{i}.log --daemonize"
|
process.start_command = "bundle exec thin start -e production -t 0 --socket #{sockdir}/thin.#{i}.sock --pid #{rails_root}/tmp/pids/thin#{i}.pid --log #{rails_root}/log/thin-#{i}.log --daemonize"
|
||||||
|
Loading…
Reference in New Issue
Block a user