Fix the copy of the conf directory files during the install

This commit is contained in:
Mark Crane
2014-05-09 23:17:30 +00:00
parent e0a4666130
commit 967736676e
2 changed files with 30 additions and 41 deletions
+2 -16
View File
@@ -1279,27 +1279,13 @@ if ($_POST["install_step"] == "3" && count($_POST) > 0 && strlen($_POST["persist
$install->switch_conf_dir = $switch_conf_dir;
$install->switch_scripts_dir = $switch_scripts_dir;
$install->switch_sounds_dir = $switch_sounds_dir;
$install->recursive_delete($switch_conf_dir);
clearstatcache();
$install->copy_conf();
$install->copy();
clearstatcache();
//copy resources/templates/conf to the freeswitch conf dir
if (file_exists('/usr/share/fusionpbx/resources/templates/conf')){
$src_dir = "/usr/share/fusionpbx/resources/templates/conf";
}
else {
$src_dir = $_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/resources/templates/conf";
}
$dst_dir = $switch_conf_dir;
if (is_readable($dst_dir)) {
$install->recursive_copy($src_dir, $dst_dir);
}
//print_r($install->result);
//create the dialplan/default.xml for single tenant or dialplan/domain.xml
if (file_exists($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/app/dialplan")) {
require_once "app/dialplan/resources/classes/dialplan.php";
$dialplan = new dialplan;
$dialplan->domain_uuid = $_SESSION["domain_uuid"];
$dialplan->domain = $domain_name;