If the debian package usr share conf directory exists then use it as the source for the copy.

This commit is contained in:
Mark Crane 2014-04-09 05:00:11 +00:00
parent 62c0b3a206
commit b1803607c3
1 changed files with 7 additions and 1 deletions

View File

@ -1273,7 +1273,13 @@ 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";
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 (!file_exists($dst_dir)) {
if (is_readable($dst_dir)) {