script clean up

Signed-off-by: tamil <tamil.muthamizhan@inktank.com>
This commit is contained in:
tamil 2012-11-08 16:06:04 -08:00
parent 9ea95a0e0b
commit c45a415ced
2 changed files with 8 additions and 12 deletions

View File

@ -24,17 +24,13 @@ sub get_cmd_op
# Function to check if radosgw is already running
sub get_status {
my $service = "radosgw";
my $cmd = "ps -ef | grep $service | grep -v grep";
my $status = get_cmd_op($cmd);
if (!$status) {
my $cmd1 = "echo $?";
my $status1 = get_cmd_op($cmd1);
if (!$status1){
return 0;
}
}
return 1;
my $service = "radosgw";
my $cmd = "ps -ef | grep $service | grep -v grep";
my $status = get_cmd_op($cmd);
if ($status =~ /client.radosgw.gateway/ ){
return 0;
}
return 1;
}
#Function that executes the CLI commands and returns the output of the command

View File

@ -143,7 +143,7 @@ print "adding file to bucket: $mytestfilename\n";
print "Downloading $mytestfilename to temp file: /tmp/downloadfilepurgeme...";
$response = $bucket->get_key_filename( $mytestfilename, 'GET', '/tmp/downloadfilepurgeme' )
or die $s3->err . ": " . $s3->errstr;
$logmsg = "file dowloaded";
$logmsg = "file downloaded";
_write_log_entry($logmsg);