AnonSec Shell
Server IP : 92.204.138.22  /  Your IP : 18.221.139.146
Web Server : Apache
System : Linux ns1009439.ip-92-204-138.us 4.18.0-553.8.1.el8_10.x86_64 #1 SMP Tue Jul 2 07:26:33 EDT 2024 x86_64
User : internationaljou ( 1019)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/internationaljou/public_html/admin/js/BROKY_ADMIN/alfasymlink/root/scripts/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     

Current File : /home/internationaljou/public_html/admin/js/BROKY_ADMIN/alfasymlink/root/scripts/build_bandwidthdb_root_cache_in_background
#!/usr/local/cpanel/3rdparty/bin/perl

# cpanel - scripts/build_bandwidthdb_root_cache_in_background
#                                                  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

package scripts::build_bandwidthdb_root_cache;

use strict;
use warnings;

use Cpanel::Daemonizer::Tiny ();
use Cpanel::ConfigFiles      ();
use Cpanel::FileUtils::Open  ();

my $orig_dollar_zero = $0;

__PACKAGE__->script() if !caller;

sub script {
    my $pid = Cpanel::Daemonizer::Tiny::run_as_daemon(
        sub {
            ####
            # The next two calls are unchecked because it cannot be captured when running as a daemon
            Cpanel::FileUtils::Open::sysopen_with_real_perms( \*STDERR, $Cpanel::ConfigFiles::CPANEL_ROOT . '/logs/error_log', 'O_WRONLY|O_APPEND|O_CREAT', 0600 );
            open( STDOUT, '>&', \*STDERR ) || warn "Failed to redirect STDOUT to STDERR";

            require Cpanel::BandwidthDB::RootCache;
            Cpanel::BandwidthDB::RootCache->new(
                'import_options' => {
                    before_user => \&_before_user,
                }
            );
        }
    );

    print "Building BandwidthDB RootCache in the background (PID $pid)...\n";

    return;
}

sub _before_user {
    my ($user) = @_;

    $0 = "$orig_dollar_zero - import $user";
    return 1;
}

1;

Anon7 - 2022
AnonSec Team