install_first_time.php rename to install.php.

This commit is contained in:
markjcrane 2016-02-29 11:28:43 -07:00
parent 03897edf95
commit c23f53ea34
3 changed files with 12 additions and 6 deletions

View File

@ -61,8 +61,8 @@ if (!if_group("superadmin")) {
echo "<br><br>"; echo "<br><br>";
echo $text['description-install']; echo $text['description-install'];
echo "<br><br>"; echo "<br><br>";
echo "<form name='frm' method='post' action='/core/install/install_first_time.php'>\n"; echo "<form name='frm' method='post' action='/core/install/install.php'>\n";
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n"; echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
echo "<tr>\n"; echo "<tr>\n";
echo " <td width='30%' class='vncell'>\n"; echo " <td width='30%' class='vncell'>\n";
@ -79,4 +79,5 @@ if (!if_group("superadmin")) {
//include the footer //include the footer
require_once "resources/footer.php"; require_once "resources/footer.php";
?> ?>

View File

@ -73,7 +73,7 @@ include "root.php";
throw new Exception("backup_dir() source directory '".$dir."' does not exist."); throw new Exception("backup_dir() source directory '".$dir."' does not exist.");
} }
$dst_tar = join( DIRECTORY_SEPARATOR, array(sys_get_temp_dir(), "$backup_name.tar")); $dst_tar = join( DIRECTORY_SEPARATOR, array(sys_get_temp_dir(), "$backup_name.tar"));
//pharData is the correct ay to do it, but it keeps creating incomplete archives //pharData is the correct way to do it, but it keeps creating incomplete archives
//$tar = new PharData($dst_tar); //$tar = new PharData($dst_tar);
//$tar->buildFromDirectory($dir); //$tar->buildFromDirectory($dir);
$this->write_debug("backing up to $dst_tar"); $this->write_debug("backing up to $dst_tar");
@ -106,18 +106,23 @@ include "root.php";
} }
protected function copy_conf() { protected function copy_conf() {
$this->write_progress("\tCopying Config"); //send a message
$this->write_progress("\tCopying Config");
//make a backup of the config //make a backup of the config
if (file_exists($this->global_settings->switch_conf_dir())) { if (file_exists($this->global_settings->switch_conf_dir())) {
$this->backup_dir($this->global_settings->switch_conf_dir(), 'fusionpbx_switch_config'); $this->backup_dir($this->global_settings->switch_conf_dir(), 'fusionpbx_switch_config');
recursive_delete($this->global_settings->switch_conf_dir()); recursive_delete($this->global_settings->switch_conf_dir());
} }
//make sure the conf directory exists
//make the directory
sure the conf directory exists
if (!is_dir($this->global_settings->switch_conf_dir())) { if (!is_dir($this->global_settings->switch_conf_dir())) {
if (!mkdir($this->global_settings->switch_conf_dir(), 0774, true)) { if (!mkdir($this->global_settings->switch_conf_dir(), 0774, true)) {
throw new Exception("Failed to create the switch conf directory '".$this->global_settings->switch_conf_dir()."'. "); throw new Exception("Failed to create the switch conf directory '".$this->global_settings->switch_conf_dir()."'. ");
} }
} }
//copy resources/templates/conf to the freeswitch conf dir //copy resources/templates/conf to the freeswitch conf dir
if (file_exists('/usr/share/examples/fusionpbx/resources/templates/conf')){ if (file_exists('/usr/share/examples/fusionpbx/resources/templates/conf')){
$src_dir = "/usr/share/examples/fusionpbx/resources/templates/conf"; $src_dir = "/usr/share/examples/fusionpbx/resources/templates/conf";

View File

@ -42,7 +42,7 @@ include "root.php";
} elseif (file_exists("/usr/local/etc/fusionpbx/config.php")) { } elseif (file_exists("/usr/local/etc/fusionpbx/config.php")) {
//bsd //bsd
} else { } else {
header("Location: ".PROJECT_PATH."/core/install/install_first_time.php"); header("Location: ".PROJECT_PATH."/core/install/install.php");
exit; exit;
} }