Update install.php

This commit is contained in:
FusionPBX 2022-10-22 18:39:03 -06:00 committed by GitHub
parent a0e3cd1268
commit dd87f510c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 26 additions and 24 deletions

View File

@ -96,30 +96,32 @@
//linux //linux
$config_path = "/etc/fusionpbx"; $config_path = "/etc/fusionpbx";
} }
if (isset($config_path) && is_writable($config_path)) { if (isset($config_path)) {
//include the config.php file if (is_writable($config_path)) {
include $config_path.'/config.php'; //include the config.php file
include $config_path.'/config.php';
//build the config file
$install = new install; //build the config file
$install->database_host = $db_host; $install = new install;
$install->database_port = $db_port; $install->database_host = $db_host;
$install->database_name = $db_name; $install->database_port = $db_port;
$install->database_username = $db_username; $install->database_name = $db_name;
$install->database_password = $db_password; $install->database_username = $db_username;
$install->config(); $install->database_password = $db_password;
$install->config();
//redirect the user
header("Location: /"); //redirect the user
exit; header("Location: /");
} exit;
else { }
//config directory is not writable run commands as root else {
echo "Please run the following commands as root.<br />\n"; //config directory is not writable run commands as root
echo "cd ".$document_root."<br />\n"; echo "Please run the following commands as root.<br />\n";
echo "php ".$document_root."/core/upgrade/upgrade.php<br />\n"; echo "cd ".$document_root."<br />\n";
unset($config_path); echo "php ".$document_root."/core/upgrade/upgrade.php<br />\n";
exit; unset($config_path);
exit;
}
} }
} }