Skip to content

Commit

Permalink
call remote_process_exists instead of process_exists
Browse files Browse the repository at this point in the history
Method was renamed in 1afa872
  • Loading branch information
mifix committed Apr 23, 2012
1 parent 24296c3 commit 85a211e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/capistrano-unicorn/capistrano_integration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def self.load_into(capistrano_config)
def remote_file_exists?(full_path)
'true' == capture("if [ -e #{full_path} ]; then echo 'true'; fi").strip
end

# Check if process is running
#
def remote_process_exists?(pid_file)
Expand Down Expand Up @@ -46,7 +46,7 @@ def unicorn_send_signal(pid, signal)
desc 'Start Unicorn master process'
task :start, :roles => :app, :except => {:no_release => true} do
if remote_file_exists?(unicorn_pid)
if process_exists?(unicorn_pid)
if remote_process_exists?(unicorn_pid)
logger.important("Unicorn is already running!", "Unicorn")
next
else
Expand All @@ -60,7 +60,7 @@ def unicorn_send_signal(pid, signal)
else
config_path = "#{current_path}/config/unicorn/#{unicorn_env}.rb"
end

if remote_file_exists?(config_path)
logger.important("Starting...", "Unicorn")
run "cd #{current_path} && BUNDLE_GEMFILE=#{current_path}/Gemfile bundle exec #{unicorn_bin} -c #{config_path} -E #{app_env} -D"
Expand Down

0 comments on commit 85a211e

Please sign in to comment.