File: //proc/self/root/proc/self/root/scripts.20110531.215904.25158/easyapache
#!/usr/bin/perl
# cpanel - easyapache Copyright(c) 2008 cPanel, Inc.
# All rights Reserved.
# copyright@cpanel.net http://cpanel.net
# This code is subject to the cPanel license. Unauthorized copying is prohibited
BEGIN { unshift @INC, '/usr/local/cpanel', '/var/cpanel/perl/easy'; }
use strict;
use Cpanel::ProcessCheck (); #issafe
my $from_upcp = ( @ARGV && grep( /^--from-upcp$/, @ARGV ) ) ? 1 : 0;
if ( !$from_upcp ) {
my %PPIDS = Cpanel::ProcessCheck::previouspids( 'process' => 'upcp' ); #issafe
if ( scalar keys %PPIDS ) {
print "cPanel Update (upcp) is currently running. Please wait for upcp to complete, or kill off all upcp processes and try again.\n";
exit 1;
}
}
system '/scripts/cpanel_easy_sanity_check', '--quiet', @ARGV; # since its not distributed
require Cpanel::Easy::Apache; #issafe
my $ea = Cpanel::Easy::Apache->new( #issafe
{
'ui_obj' => 'Cpanel::Easy::Apache::UI::CLI', #issafe
'param_obj' => 'Cpanel::CPAN::Getopt::Param', #issafe
'help' => sub {
my ($easy) = @_;
require Cpanel::Easy::Apache::UI::CLI::Help; #issafe
Cpanel::Easy::Apache::UI::CLI::Help::do_help_and_exit($easy); #issafe
},
}
);
$ea->run();