Server IP : 162.214.67.83  /  Your IP : 216.73.216.223
Web Server : Apache
System : Linux dedi-13542965.clustter.com.br 5.14.0-741.22.1.el9_9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Nov 12 14:34:46 UTC 2026 x86_64
User : gjpengenharia ( 1046)
PHP Version : 8.2.36
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF
Directory (0755) :  /scripts/

[  Home  ][  C0mmand  ][  Upload File  ]

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

#                                      Copyright 2026 WebPros International, LLC
#                                                           All rights reserved.
# copyright@cpanel.net                                         http://cpanel.net
# This code is subject to the cPanel license. Unauthorized copying is prohibited.

use cPstrict;

# The distinct entry point is the core/plugin capability contract. Older
# plugins lack it, so core must not mistake the legacy UI-only sync for full
# runtime reconciliation.
package scripts::comet_runtime_sync;
our $SYNC_SCRIPT = '/usr/local/cpanel/scripts/comet_license_registration_sync';

sub run (@args) {
    require $SYNC_SCRIPT;
    my ( $disable, $package_arg, $check_only, $try_lock );
    if    ( @args == 1 && $args[0] eq '--disable' )                                          { $disable     = 1; }
    elsif ( @args == 1 && $args[0] eq '--check' )                                            { $check_only  = 1; }
    elsif ( @args == 1 && $args[0] eq '--try-lock' )                                         { $try_lock    = 1; }
    elsif ( @args == 2 && $args[0] eq '--package-install' && $args[1] =~ m/\A[0-9a-z-]+\z/ ) { $package_arg = $args[1]; }
    elsif (@args)                                                                            { die "Usage: comet_runtime_sync [--disable | --check | --try-lock | --package-install mode]\n"; }
    return scripts::comet_license_registration_sync::run( $disable, $package_arg, $check_only, $try_lock );
}
unless (caller) {
    require Whostmgr::CometBackup::Logger;
    my $logger = Whostmgr::CometBackup::Logger->new();
    local $SIG{__WARN__} = sub ($message) {
        local $@;
        local $!;
        $logger->warn($message);
        print STDERR $message;
    };
    my $status = eval { run(@ARGV); };
    my $error  = $@;
    if ($error) { $logger->error($error); die $error; }
    exit $status;
}
1;