diff --git a/lib/haproxyctl/environment.rb b/lib/haproxyctl/environment.rb index aee53fd..022b55a 100644 --- a/lib/haproxyctl/environment.rb +++ b/lib/haproxyctl/environment.rb @@ -79,7 +79,7 @@ def check_running end # verify these pid(s) exists and are haproxy - if pids and pids.all? { |pid| pid =~ /^\d+$/ and `ps -p #{pid} -o cmd=` =~ /#{exec}/ } + if pids and pids.all? { |pid| pid =~ /^\d+$/ and `ps -p #{pid} -o command=` =~ /#{exec}/ } return pids end end