MOON
Server: Apache
System: Linux vps.thepromohut.com 2.6.18-398.el5 #1 SMP Tue Sep 16 20:51:48 EDT 2014 i686
User: caretrak (507)
PHP: 5.2.10
Disabled: NONE
Upload Files
File: //scripts.20110601.041516.15411/fixbuggynamed
#!/usr/bin/perl
# cpanel - fixbuggynamed                          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::RpmUtils;
use Cpanel::OSSys;

my ( $system, $nodename, $release, $version, $machine ) = Cpanel::OSSys::uname();

exit if ( !-e "/etc/chkserv.d/named" );

if ( $system =~ /freebsd/i ) {
    exit;
}

if ( -e "/vsrvmgrq" ) {
    $nocap = `rpm -q bind`;
    if ( $nocap !~ /NOCAP/ ) {
        Cpanel::RpmUtils::rpmcmd( "-Uvh", "--nodeps", "http://ftp.cpanel.net/bind9/bind-9.2.1-1.7x.2_NOCAP.i386.rpm", "http://ftp.cpanel.net/bind9/bind-utils-9.2.1-1.7x.2_NOCAP.i386.rpm", "http://ftp.cpanel.net/bind9/bind-devel-9.2.1-1.7x.2_NOCAP.i386.rpm" );
        system( 'cp', '-f', '/usr/local/cpanel/src/chkservd/chkserv.d/named', '/etc/chkserv.d/named' );
        system '/scripts/restartsrv_chkservd';
        system('/scripts/restartsrv_named');
    }
}