Current File : //scripts/updatenow
#!/usr/local/cpanel/3rdparty/bin/perl

# cpanel - scripts/updatenow                       Copyright 2022 cPanel, L.L.C.
#                                                           All rights reserved.
# copyright@cpanel.net                                         http://cpanel.net
# This code is subject to the cPanel license. Unauthorized copying is prohibited

#
# This is the authorative code used to sync /usr/local/cpanel
# Accept no imitators.
#

=head1 NAME

updatenow - updates /usr/local/cpanel from update servers

=head1 USAGE

    # Called from upcp like this:
    # --force tells updatenow to sync even if the version has not changed (similar to --sync). This setting will also bypass cron detection.
    updatenow --upcp

    # upcp will call this script like this if upcp is called with --force
    updatenow --upcp --force

    # If files which this script manages somehow get deleted, this will re-sync them but not upgrade.
    # This is used by other cpanel scripts as a safety measure.
    updatenow.static --sync

    # Used by cpanel installer prior to vps optimization
    updatenow --no-check-perl

=head1 DESCRIPTION

NOTE: Under most circumstances, you should never call this script directly. B</usr/local/cpanel/scripts/upcp>, called with an optional [--force]
should be all you need. --sync is only intended to be called by other cpanel scripts when it appears that cpanel managed files
have been deleted.

The normal usage of this script is to update cpanel to the latest version of your TIER I<(see /etc/cpupdate.conf)>.
By default, no update is done by default if you are already on that version. The UPDATES setting in cpupdate.conf
is also honored when the environment variable CPANEL_IS_CRON is set (usually from upcp).

If an HTTPUPDATE= setting is present in /etc/cpsources.conf with a hostname, this will be the preferred source to sync from.

=cut

use strict;
use warnings;

BEGIN {
    # the q{} on the line below was done to prevent perlpkg from stripping the @INC statement from static.
    @INC = grep { index( $_, '/usr/local/cpanel' ) == 0 } @INC;    ## no critic(RequireLocalizedPunctuationVars)

    # if we are being called with a compile check flag ( perl -c ), skip the begin block
    # so we don't actually call upcp.static when just checking syntax and such is OK
    return if $^C;

    # static never gets --use-checked and should pass all the begin block checks
    return if $0 =~ /\.static$/;

    # let the '--use-check' instance compiled
    if ( grep { $_ eq '--use-check' } @ARGV ) {
        no warnings;    ## no critic qw(ProhibitNoWarnings)

        # dynamic definition of the INIT block
        eval "INIT { exit(0); }";    ## no critic qw(BuiltinFunctions::ProhibitStringyEval)
        return;
    }

    system("$0 --use-check >/dev/null 2>&1");

    # compilation is ok with '--use-check', we will continue the non static version
    return if $? == 0;

    my $static = $0 . ".static";
    if ( -f $static ) {
        print STDERR "We determined that $0 had compilation issues..\n";
        print STDERR "Trying to exec $static " . join( ' ', @ARGV ) . "\n";
        exec( $^X, $static, @ARGV );
    }
}

# Should be just after CleanINC to be sure Cpanel::Exception is not loaded earlier
use Cpanel::Exception::CORE      ();    # PPI USE OK -- load core exception modules
use Cpanel::Exception::UpdateNow ();    # PPI USE OK -- load all exceptions for static script

use Cpanel::Update::Now;

use Cpanel::CPAN::Locales::DB::Territory::en ();    # PPI USE OK -- preload for perlstatic
use Cpanel::CPAN::Locales::DB::Language::en  ();    # PPI USE OK -- preload for perlstatic
use Cpanel::Crypt::GPG::VendorKeys::Verify   ();    # PPI USE OK -- do not compile into Cpanel::HttpRequest, but require it here for updatenow.static
use Cpanel::HttpRequest                      ();    # PPI USE OK -- do not compile into Cpanel::RPM::Versions::File, but require it here for updatenow.static
use Cpanel::Sync::Common                     ();    # PPI USE OK -- do not remove, required for Cpanel::HttpRequest on new installs
use Cpanel::Sys::Hardware::Memory::Linux     ();    # PPI USE OK -- included for fresh installs so it ends up in .static (see case 184689)
use Cpanel::Sys::Hardware::Memory::Vzzo      ();    # PPI USE OK -- included for fresh installs so it ends up in .static (see case 184689)
use Cpanel::iContact::Provider::Email        ();    # PPI USE OK -- CPANEL-25967: ensure we can notify about blockers during install
use Cpanel::Autodie::UpdateNow               ();    # PPI USE OK -- load all autodie modules for static script
use Cpanel::HiRes ( preload => 'perl' );

BEGIN {
    if ( grep { $_ eq '--INC' } @ARGV ) {
        print join "\n", sort keys %INC;
        print "\n";

        exit 0;
    }
}

my $options = Cpanel::Update::Now::parse_argv(@ARGV);

# Man option is outside C:U:N
if ( $options->{'man'} ) {
    exec( 'perldoc', $0 );
    exit;
}

# New with options from parse_argv
my $update_now = Cpanel::Update::Now->new($options);

# Eval and call terminate so testing can happen outside this script.
eval { $update_now->run(); };

# $update_now->run() will always throw. Now have the object shut down this program based on the throw.
$update_now->terminate($@);

print "Should never get here\n";
exit 1;
Uncategorized – Página 3

Categoría: Uncategorized

  • Annotation Aisé Casino Habitants de l’hexagone I Prime trois-cents, 50 Free Spins

    Le « Félidé directement, sauf que l’choix de contact via é-terme conseillé pour assurent mon déclaration évidemment en cas de demande. Je me vous préconisons de bien emporter esprit des critères en bonus , ! leurs terme caporaux en salle de jeu. Il est futur dont les réglages disposent été amarrés en fonction í  l’époque…

  • 100 percent free Live Intercourse Adult cams and you may Mature Chat with Naked Females

    We don’t know if they’s home rules or any sort of accident, nevertheless these girls are really another thing. Talking about VR intercourse webcams, I must give CamSoda the brand new accolades of the finest VR chat experience for the reason that it’s just how it is. Firstly, your won’t find warmer speak habits somewhere…

  • Porn Search engines See Free Pornography Movies & Pornstars

    I really wear’t brain if you see other porn website list most other than simply exploit. I am aware which i is also’t review porn sites in a fashion that makes all of the of you pleasant guys and women happier, I get one. However, please do not use ThePornDude. Finest Web sites Than simply ThePornDude –…

  • Gay Pornography Blog Explicit images and videos offering the newest homosexual porno moments & pornography stars

    Allies from Reid have accused Youngkin and his partners of focusing on the brand new candidate because of their sexuality. Reid are Virginia’s basic publicly homosexual statewide nominee. Reid has declined the newest account are their and you can would not action away — leaving group loyal scrambling in order to unite regarding the half…

  • Camilla Araujo Nude Videos

    Which video celebs Camilla Araujo, known for its dominance inside the Social network & Onlyfans. Here are a few a lot more of its personal cara_gioxxx articles right here. After the Squid Video game is throughout, Camilla did say she would work at OnlyFans. It seems like she performed for some time, however, including I…

  • Рекламную в Лото Клуб Действия а также Бонусы Автомотолотерея Loto Club

    На врученной вебстранице игрокам предполагаются самые новоиспеченные безвозмездные бездепозитные бонусы игорный дом Игра Авиаклуб за регистрацию возьмите в данное время. Чтобы, чтобы возыметь премия в казино Игра Аэроклуб получите и распишитесь официальном веб сайте, заперво должно изобрести пищевкусовой агрокабинет. После этого пользователи множат задействовать премия вне вклад или во время регистрирования.

  • LotoClub Игра Аэроклуб версия в видах iOS а еще Дроид! Бонусы за вербовое

    Чтобы геймерам быть в присутствии благоприятнее напасть на след, игры быть в наличии разделены возьмите несколько категорий. На наш взгляд, причина звезды содержится во щедрости данных слотов. Начала Loto Club — сие безопасность, прямота вдобавок справедливость.

  • Loto Club Действующие акта и бонсы дебаркадеры Лото Клуб

    Уяснить во данном свободно, если смекать ведущие машины службы операций а также бонусных программ. Актуально выдвинуть на условия, связанные из активацией предложений, а еще учитывать их индивидуальности, чтобы получить всемерную выгоду.

  • 75+ Gambling enterprises instead of Gamstop Non GamStop Gambling enterprise Internet sites

    Whilst you can be’t explore 100 percent free spins within these gambling games, you could potentially have fun using them. At the same time, the new gambling enterprise’s deposit bonus could have dining table game included in the video game one subscribe to the requirement. For United kingdom players, the newest legality of low GamStop…

  • Vox Casino System kodowania Promocyjny Bonus z brakiem Depozytu

    Kod promocji VoxCasino owo nadzwyczajny zbiór sygnałów, jaki po wpisaniu w całej zarejestrowania się albo po dedykowanym polu na stronie kasyna umożliwia uzyskanie wyjątkowych bonusów. Szyfr promocyjny Vox Casino wyjąwszy depozytu 2024 daje wejście do odwiedzenia ekskluzywnych ofert, które to pozwolą fanom posmakować własnych mocy w całej rozrywkach wyjąwszy konieczności finalizowania wpłaty.