mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 23:58:31 -05:00
Ensure tmp/pids exist when using unicorn
This commit is contained in:
parent
5ddcd30e75
commit
096138d0f7
1 changed files with 2 additions and 0 deletions
|
@ -2,6 +2,7 @@ require "socket"
|
||||||
require "csv"
|
require "csv"
|
||||||
require "yaml"
|
require "yaml"
|
||||||
require "optparse"
|
require "optparse"
|
||||||
|
require "fileutils"
|
||||||
|
|
||||||
@include_env = false
|
@include_env = false
|
||||||
@result_file = nil
|
@result_file = nil
|
||||||
|
@ -170,6 +171,7 @@ begin
|
||||||
|
|
||||||
pid = if @unicorn
|
pid = if @unicorn
|
||||||
ENV['UNICORN_PORT'] = @port.to_s
|
ENV['UNICORN_PORT'] = @port.to_s
|
||||||
|
FileUtils.mkdir_p(File.join('tmp', 'pids'))
|
||||||
spawn("bundle exec unicorn -c config/unicorn.conf.rb")
|
spawn("bundle exec unicorn -c config/unicorn.conf.rb")
|
||||||
else
|
else
|
||||||
spawn("bundle exec thin start -p #{@port}")
|
spawn("bundle exec thin start -p #{@port}")
|
||||||
|
|
Loading…
Reference in a new issue