CHips L MINI SHELL

CHips L pro

Current Path : /proc/2/cwd/proc/self/root/proc/3/root/proc/3/root/scripts/
Upload File :
Current File : //proc/2/cwd/proc/self/root/proc/3/root/proc/3/root/scripts/rebuild_available_rpm_addons_cache

#!/usr/local/cpanel/3rdparty/bin/perl
# cpanel - scripts/rebuild_available_rpm_addons_cache Copyright 2017 cPanel, Inc.
#                                                           All rights Reserved.
# copyright@cpanel.net                                         http://cpanel.net
# This code is subject to the cPanel license. Unauthorized copying is prohibited

use strict;
use warnings;

use Whostmgr::Cpaddon::RPMSupport               ();
use Whostmgr::Cpaddon::RPMAddonCacheFileManager ();

exit run(@ARGV) unless caller;

sub run {
    my @args = @_;
    @args = grep { !/--verbose/ } @args;    # compatibility with deleted clear_cpaddon_ui_caches script
    _die_usage() if @args;

    my $available_rpms = Whostmgr::Cpaddon::RPMSupport::get_available_addons();

    Whostmgr::Cpaddon::RPMAddonCacheFileManager->save($available_rpms);

    return 0;
}

sub _die_usage {
    die <<EOU;
usage: $0

Rebuild the available RPM-based cPAddons cache at /var/cpanel/available_rpm_addons.cache
EOU
}

Copyright 2K16 - 2K18 Indonesian Hacker Rulez