#!/usr/bin/perl
# cpanel - autofixer/fpindexfile                  Copyright(c) 2014 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::HttpRequest;

my $httpClient = Cpanel::HttpRequest->new( 'signed' => 1 );

## audit case 45000: leaving this references to EDGE as is; presumably,
##   this autofixer has served its purpose
$httpClient->request(
    'host'     => 'httpupdate.cpanle.net',
    'url'      => "/cpanelsync/EDGE/scripts/setupfp5",
    'protocol' => 1,
    'destfile' => "/scripts/setupfp5"
);

$httpClient->request(
    'host'     => 'httpupdate.cpanle.net',
    'url'      => "/cpanelsync/EDGE/bin/fpconvert",
    'protocol' => 1,
    'destfile' => "/usr/local/cpanel/bin/fpconvert"
);

exec( "/usr/local/cpanel/bin/fpconvert", "--force" );
