Skip to content

Commit fd4cfde

Browse files
author
dcy
committed
Secondary DNS - Fedora installation/update routine update
1 parent a59731a commit fd4cfde

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

install/dist/lib/fedora.lib.php

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -481,6 +481,21 @@ public function configure_bind() {
481481

482482
// add the include line at the end of named.conf.
483483
replaceLine('/etc/named.conf','include "/etc/named.conf.local";','include "/etc/named.conf.local";',0,1);
484+
485+
//* Check if the zonefile directory has a slash at the end
486+
$content=$conf['bind']['bind_zonefiles_dir'];
487+
if(substr($content,-1,1) != '/') {
488+
$content .= '/';
489+
}
490+
491+
//* Create the slave subdirectory
492+
$content .= 'slave';
493+
$content_mkdir = 'mkdir -p '.$content;
494+
exec($content_mkdir);
495+
496+
//* Chown the slave subdirectory to $conf['bind']['bind_user']
497+
exec('chown '.$conf['bind']['bind_user'].':'.$conf['bind']['bind_group'].' '.$content);
498+
exec('chmod 770 '.$content);
484499

485500
}
486501

@@ -959,4 +974,4 @@ public function install_crontab()
959974

960975
}
961976

962-
?>
977+
?>

0 commit comments

Comments
 (0)