if the debian package scripts directory exists then use it for the source

This commit is contained in:
Mark Crane
2014-04-09 04:33:50 +00:00
parent cfd6ce9033
commit f26267cf36
2 changed files with 7 additions and 2 deletions
+6 -1
View File
@@ -116,7 +116,12 @@ include "root.php";
function copy_scripts() { function copy_scripts() {
clearstatcache(); clearstatcache();
if (file_exists($this->switch_scripts_dir)) { if (file_exists($this->switch_scripts_dir)) {
$src_dir = $_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/resources/install/scripts'; if (file_exists('/usr/share/fusionpbx/resources/install/scripts')){
$src_dir = '/usr/share/fusionpbx/resources/install/scripts';
}
else {
$src_dir = $_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/resources/install/scripts';
}
$dst_dir = $this->switch_scripts_dir; $dst_dir = $this->switch_scripts_dir;
if (is_readable($this->switch_scripts_dir)) { if (is_readable($this->switch_scripts_dir)) {
$this->recursive_copy($src_dir, $dst_dir); $this->recursive_copy($src_dir, $dst_dir);
+1 -1
View File
@@ -1,7 +1,7 @@
<?php <?php
/* /*
FusionPBX FusionPBX
Version: MPL 1.1 Version: MPL 1.1s
The contents of this file are subject to the Mozilla Public License Version The contents of this file are subject to the Mozilla Public License Version
1.1 (the "License"); you may not use this file except in compliance with 1.1 (the "License"); you may not use this file except in compliance with