mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-02-10 13:15:07 +00:00
Only perform these actions if the directory exists during the install.
This commit is contained in:
@@ -1261,27 +1261,35 @@ if ($_POST["install_step"] == "3" && count($_POST) > 0 && strlen($_POST["persist
|
||||
clearstatcache();
|
||||
|
||||
//copy resources/templates/conf to the freeswitch/conf dir
|
||||
$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);
|
||||
if (file_exists($switch_conf_dir)) {
|
||||
$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);
|
||||
}
|
||||
//print_r($install->result);
|
||||
|
||||
//create the dialplan/default.xml for single tenant or dialplan/domain.xml
|
||||
require_once "app/dialplan/resources/classes/dialplan.php";
|
||||
$dialplan = new dialplan;
|
||||
$dialplan->domain_uuid = $_SESSION["domain_uuid"];
|
||||
$dialplan->domain = $domain_name;
|
||||
$dialplan->switch_dialplan_dir = $switch_dialplan_dir;
|
||||
$dialplan->restore_advanced_xml();
|
||||
//print_r($dialplan->result);
|
||||
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;
|
||||
$dialplan->switch_dialplan_dir = $switch_dialplan_dir;
|
||||
$dialplan->restore_advanced_xml();
|
||||
//print_r($dialplan->result);
|
||||
}
|
||||
|
||||
//write the xml_cdr.conf.xml file
|
||||
xml_cdr_conf_xml();
|
||||
if (file_exists($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/app/xml_cdr")) {
|
||||
xml_cdr_conf_xml();
|
||||
}
|
||||
|
||||
//write the switch.conf.xml file
|
||||
switch_conf_xml();
|
||||
if (file_exists($switch_conf_dir)) {
|
||||
switch_conf_xml();
|
||||
}
|
||||
}
|
||||
|
||||
//login the user account
|
||||
|
||||
Reference in New Issue
Block a user