# 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;
# 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;