Warning: Cannot modify header information - headers already sent by (output started at /home/destefa1/public_html/nf/function.php:1) in /home/destefa1/public_html/nf/function.php on line 215
Warning: Cannot modify header information - headers already sent by (output started at /home/destefa1/public_html/nf/function.php:1) in /home/destefa1/public_html/nf/function.php on line 216
Warning: Cannot modify header information - headers already sent by (output started at /home/destefa1/public_html/nf/function.php:1) in /home/destefa1/public_html/nf/function.php on line 217
Warning: Cannot modify header information - headers already sent by (output started at /home/destefa1/public_html/nf/function.php:1) in /home/destefa1/public_html/nf/function.php on line 218
Warning: Cannot modify header information - headers already sent by (output started at /home/destefa1/public_html/nf/function.php:1) in /home/destefa1/public_html/nf/function.php on line 219
Warning: Cannot modify header information - headers already sent by (output started at /home/destefa1/public_html/nf/function.php:1) in /home/destefa1/public_html/nf/function.php on line 220
#!/usr/local/cpanel/3rdparty/bin/perl
# cpanel4 - scripts Copyright(c) 1997-2011 cPanel, Inc..
# All rights Reserved.
# copyright@cpanel.net http://cpanel.net
# This code is subject to the cpanel license. Unauthorized copying is prohibited
print "Rebuilding DNS Zones List from master server .....\n";
my $dnsmaster;
open( CONF, "/etc/wwwacct.conf" ) || die "/etc/wwwacct.conf not found\n";
while () {
$_ =~ s/\n//g;
if ( $_ !~ /^;/ ) {
if ( $_ =~ /DNSMASTER/ ) {
$dnsmaster = ( split / /, $_ )[1];
}
}
}
close(CONF);
if ( $dnsmaster eq "" || $dnsmaster eq "none" ) {
print "Sorry no dns master was defined\n";
exit;
}
system("cp -f /etc/named.conf /etc/named.conf.pretransfer");
system("scp -o \"Protocol 1,2\" $dnsmaster:/etc/named.conf /etc/named.conf.dnstransfer");
my (
$dev, $ino, $mode, $nlink, $uid, $gid, $rdev, $size,
$atime, $mtime, $ctime, $blksize, $blocks
) = stat("/etc/named.conf.dnstransfer");
if ( $size < 10 ) {
print "Scp failed!\n";
exit;
}
open( RNC, ">/etc/named.conf" );
open( NC, "/etc/named.conf.pretransfer" );
while () {
if (/zone \"/) {
last;
}
print RNC;
}
close(NC);
open( NC, "/etc/named.conf.dnstransfer" );
my $inzones = 0;
while () {
if (/zone \"/) {
$inzones = 1;
}
if ($inzones) {
print RNC;
}
}
close(NC);
close(RNC);
system("/usr/local/cpanel/scripts/makesecondary");
print "Rebuild Complete\n";