MOON
Server: Apache/2.2.31 (Unix) mod_ssl/2.2.31 OpenSSL/0.9.8e-fips-rhel5 mod_bwlimited/1.4
System: Linux csr818.wilogic.com 2.6.18-419.el5xen #1 SMP Fri Feb 24 22:50:37 UTC 2017 x86_64
User: digitals (531)
PHP: 5.4.45
Disabled: NONE
Upload Files
File: //proc/self/root/proc/self/root/scripts.20110531.215904.25158/updatefrontpage
#!/usr/bin/perl
# cpanel - updatefrontpage                        Copyright(c) 2010 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'; }

use Cpanel::SafeRun::Simple ();
use Cpanel::OSSys           ();
use Cpanel::SafeDir::MK     ();
use Cpanel::HttpRequest     ();
use Cpanel::RpmUtils        ();

my $system = Cpanel::OSSys::get_system();

if ( $system =~ m/freebsd/i ) {
    if ( -e '/compat/ia32' ) {
        if ( !-e '/compat/ia32/usr/local' ) {
            Cpanel::SafeDir::MK( '/compat/ia32/usr/local', '0755' );
        }
        if ( !-e '/compat/ia32/usr/local/frontpage' ) {
            symlink( '/usr/local/frontpage', '/compat/ia32/usr/local/frontpage' );
        }
    }
    if ( grep( /auto/, @ARGV ) || !-e '/usr/local/frontpage/version5.0/bin' ) {
        system 'chflags', 'noschg', '/usr/local/frontpage/version5.0/apache-fp/_vti_bin/fpexe';
        system '/scripts/installfpfreebsd';
        system '/scripts/initfpsuexec';
        system 'chflags', 'schg', '/usr/local/frontpage/version5.0/apache-fp/_vti_bin/fpexe';
        setperms();
    }
}
else {
    my $frontpage_rpm = Cpanel::SafeRun::Simple::saferun( 'rpm', '-q', 'frontpage' );
    if ( !$frontpage_rpm || $frontpage_rpm =~ /(?:5\.0|5\.1|5\.2-0|not)/ ) {
        system 'chattr', '-i', '/usr/local/frontpage/version5.0/apache-fp/_vti_bin/fpexe';
        Cpanel::SafeDir::MK::safemkdir( '/var/spool/cpupdate', '0700' );
        my $httpClient = Cpanel::HttpRequest->new( 'hideOutput' => 0 );
        $httpClient->download( 'http://httpupdate.cpanel.net/fp/frontpage-2002-SR1.2.i386.rpm', '/var/spool/cpupdates/frontpage-2002-SR1.2.i386.rpm' );
        Cpanel::RpmUtils::rpmpreinstall('/var/spool/cpupdates/frontpage-2002-SR1.2.i386.rpm');
        system 'rpm', '-Uvh', '--nodeps', '/var/spool/cpupdates/frontpage-2002-SR1.2.i386.rpm';
        unlink '/var/spool/cpupdates/frontpage-2002-SR1.2.i386.rpm';
        system '/scripts/initfpsuexec';
        system 'chattr', '+i', '/usr/local/frontpage/version5.0/apache-fp/_vti_bin/fpexe';
        setperms();
    }
}
system '/scripts/checkfpkey';

exit 0;

sub setperms {
    chmod( 0755, '/usr/local/frontpage' );
    chmod( 0755, '/usr/local/frontpage/version5.0' );
    chmod( 0711, '/usr/local/frontpage/version5.0/apache-fp' );
    chmod( 0755, '/usr/local/frontpage/version5.0/apache-fp/_vti_bin' );
    system 'chown', '-R', 'bin:bin', '/usr/local/frontpage/version5.0/exes';
}