From 025f733ac283d6b4af957999fe606f586da342b7 Mon Sep 17 00:00:00 2001 From: Mark Crane Date: Wed, 9 Apr 2014 04:33:50 +0000 Subject: [PATCH] if the debian package scripts directory exists then use it for the source --- resources/classes/install.php | 7 ++++++- root.php | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/resources/classes/install.php b/resources/classes/install.php index d96c91b6a2..f0a87f13aa 100644 --- a/resources/classes/install.php +++ b/resources/classes/install.php @@ -116,7 +116,12 @@ include "root.php"; function copy_scripts() { clearstatcache(); 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; if (is_readable($this->switch_scripts_dir)) { $this->recursive_copy($src_dir, $dst_dir); diff --git a/root.php b/root.php index 7b882438ea..739801c4a1 100644 --- a/root.php +++ b/root.php @@ -1,7 +1,7 @@