Mini Shell
package Cpanel::ResourceUsage::Custom::Cloudlinux;
use strict;
use warnings;
use Cpanel::LVEInfo;
use JSON;
use Cpanel::Locale ();
sub get_usages {
my $uid = Cpanel::LVEInfo::getuid();
my $json_code = `/usr/share/l.v.e-manager/cpanel/stats_bar/get_lve_limits.py ${uid}`;
my $myHashRefDecoded = decode_json($json_code);
my $locale = Cpanel::Locale->get_handle();
my @return_array;
for my $hashref (@{$myHashRefDecoded}){
$hashref->{'description'} = $locale->maketext($hashref->{'description'});
push @return_array, $hashref;
}
return @return_array;
}
#get_usages();
1;
Zerion Mini Shell 1.0