Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: sepastian/capistrano-unicorn
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: perfectline/capistrano-unicorn
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Able to merge. These branches can be automatically merged.
  • 1 commit
  • 1 file changed
  • 1 contributor

Commits on Dec 28, 2014

  1. safe bash based remote_process_exists

    Vladimir Krylov committed Dec 28, 2014
    Copy the full SHA
    011bdf9 View commit details
Showing with 1 addition and 5 deletions.
  1. +1 −5 lib/capistrano/unicorn/utility.rb
6 changes: 1 addition & 5 deletions lib/capistrano/unicorn/utility.rb
Original file line number Diff line number Diff line change
@@ -40,11 +40,7 @@ def working_directory(path); end
# Check if a remote process exists using its pid file
#
def remote_process_exists?(pid_file)
begin
execute(*try_unicorn_user, 'kill', '-0', get_unicorn_pid) if within(fetch(:app_path)) { test('[', '-e', pid_file, ']') }
rescue SSHKit::Command::Failed => e
false
end
test("[ -e #{pid_file} ]") && test("ps -p `cat #{pid_file}` > /dev/null")
end

# Stale Unicorn process pid file