Mr.Fn4ticHz Shell
Server IP : 162.240.98.243  /  Your IP : 18.118.128.105
Web Server : Apache
System : Linux server.bti.yaw.mybluehostin.me 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User : btiyawmy ( 1003)
PHP Version : 7.2.34
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /scripts/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     

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

# cpanel - scripts/install_cpanel_analytics        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::install_cpanel_analytics;

use strict;
use warnings;

use Getopt::Long ();
use Cpanel::Imports;

use Cpanel::Plugins               ();
use Cpanel::Analytics::UiIncludes ();

__PACKAGE__->run() if !caller();

sub run {
    if ( $> != 0 ) {
        die "$0: must run as root\n";
    }

    my $help;

    Getopt::Long::GetOptionsFromArray(
        \@ARGV,
        'help' => \$help,
      )
      and ( !@ARGV )
      or do {
        usage(1);
        exit 1;    ## no critic qw(Cpanel::NoExitsFromSubroutines) -- pre-existing code; exit when displaying usage
      };

    if ($help) {
        usage();
        exit;
    }

    logger()->info(q{Installing the analytics plugin.});
    require Cpanel::Plugins;
    eval { Cpanel::Plugins::install_plugins('cpanel-analytics'); };
    logger()->warn($@) if $@ && ref $@ !~ m/ProcessFailed/;    # ProcessFailed stacks aren't very interesting.

    logger()->info(q{Enabling the analytics user interface.});
    if ( $ENV{'CPANEL_BASE_INSTALL'} ) {
        local $@;
        eval {
            require Cpanel::Analytics::UiIncludes;
            Cpanel::Analytics::UiIncludes::enable();
        };
        logger()->warn($@) if length $@;
    }

    return 1;
}

sub usage {
    my ($status) = @_;

    my $msg = <<"EOM";

install_cpanel_analytics: install cpanel-analytics plugin

Usage:
    install_cpanel_analytics [--help]

  Options:
    --help: print usage and exit
EOM

    if ($status) {
        print STDERR $msg;
    }
    else {
        print $msg;
    }

    return;
}

1;

Anon7 - 2022
AnonSec Team