@@ -1469,6 +1469,27 @@ public function configure_powerdns() {
14691469
14701470
14711471 }
1472+
1473+ //** writes bind configuration files
1474+ public function process_bind_file ($ configfile , $ target ='/ ' , $ absolute =false ) {
1475+ global $ conf ;
1476+
1477+ if ($ absolute ) $ full_file_name = $ target .$ configfile ;
1478+ else $ full_file_name = $ conf ['ispconfig_install_dir ' ].$ target .$ configfile ;
1479+
1480+ //* Backup exiting file
1481+ if (is_file ($ full_file_name )) {
1482+ copy ($ full_file_name , $ config_dir .$ configfile .'~ ' );
1483+ }
1484+ $ content = rfsel ($ conf ['ispconfig_install_dir ' ].'/server/conf-custom/install/ ' .$ configfile .'.master ' , 'tpl/ ' .$ configfile .'.master ' );
1485+ $ content = str_replace ('{mysql_server_ispconfig_user} ' , $ conf ['mysql ' ]['ispconfig_user ' ], $ content );
1486+ $ content = str_replace ('{mysql_server_ispconfig_password} ' , $ conf ['mysql ' ]['ispconfig_password ' ], $ content );
1487+ $ content = str_replace ('{mysql_server_ispconfig_database} ' , $ conf ['mysql ' ]['database ' ], $ content );
1488+ $ content = str_replace ('{mysql_server_ip} ' , $ conf ['mysql ' ]['ip ' ], $ content );
1489+ $ content = str_replace ('{ispconfig_install_dir} ' , $ conf ['ispconfig_install_dir ' ], $ content );
1490+ $ content = str_replace ('{dnssec_conffile} ' , $ conf ['ispconfig_install_dir ' ].'/server/scripts/dnssec-config.sh ' , $ content );
1491+ wf ($ full_file_name , $ content );
1492+ }
14721493
14731494 public function configure_bind () {
14741495 global $ conf ;
@@ -1487,6 +1508,15 @@ public function configure_bind() {
14871508 chown ($ content , $ conf ['bind ' ]['bind_user ' ]);
14881509 chgrp ($ content , $ conf ['bind ' ]['bind_group ' ]);
14891510 chmod ($ content , 2770 );
1511+
1512+ //* Install scripts for dnssec implementation
1513+ $ this ->process_bind_file ('dnssec-update.sh ' , '/server/scripts/ ' );
1514+ $ this ->process_bind_file ('dnssec-create.sh ' , '/server/scripts/ ' );
1515+ $ this ->process_bind_file ('dnssec-delete.sh ' , '/server/scripts/ ' );
1516+ $ this ->process_bind_file ('dnssec-autoupdate.sh ' , '/server/scripts/ ' );
1517+ $ this ->process_bind_file ('dnssec-autopickup.sh ' , '/server/scripts/ ' );
1518+ $ this ->process_bind_file ('dnssec-autocreate.sh ' , '/server/scripts/ ' );
1519+ $ this ->process_bind_file ('dnssec-config.sh ' , '/server/scripts/ ' );
14901520
14911521 }
14921522
0 commit comments