Use pgrep radosgw to determine if rados gateway is running.

Fixes: 7528
Signed-off-by: Warren Usui <warren.usui@inktank.com>
This commit is contained in:
Warren Usui 2014-02-28 21:43:31 -08:00
parent fc33eaed0d
commit 5b88856cd2
2 changed files with 4 additions and 4 deletions

View File

@ -75,9 +75,9 @@ sub get_timestamp {
# Function to check if radosgw is already running
sub get_status {
my $service = "radosgw";
my $cmd = "ps -ef | grep $service | grep -v grep";
my $cmd = "pgrep $service";
my $status = get_cmd_op($cmd);
if ($status =~ m/client.radosgw/ ){
if ($status =~ /\d+/ ){
return 0;
}
return 1;

View File

@ -78,9 +78,9 @@ sub get_timestamp {
# Function to check if radosgw is already running
sub get_status {
my $service = "radosgw";
my $cmd = "ps -ef | grep $service | grep -v grep";
my $cmd = "pgrep $service";
my $status = get_cmd_op($cmd);
if ($status =~ m/client.radosgw/ ){
if ($status =~ /\d+/ ){
return 0;
}
return 1;