From 89951703b94b58d08fb35fc967256e92f0080708 Mon Sep 17 00:00:00 2001 From: David Guglielmi Date: Tue, 29 Dec 2015 12:03:43 +0100 Subject: [PATCH] Fix status support on FreeBSD/OpenBSD when we run "ps -o cmd=" on BSD hosts we get: ps: cmd: keyword not found ps: no valid keywords; valid keywords: Using "command=" is supported on BSD/Linux "cmd=" is an alias of "command=" on Linux. --- lib/haproxyctl/environment.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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