CC-2281 Install script should check for pre-installed versions and prompt user to upgrade/full installation
Bypass choice to keep database if it's a fresh install.
This commit is contained in:
parent
5e02a46a24
commit
3e2e62afe9
|
@ -18,7 +18,10 @@ AirtimeInstall::DbConnect(true);
|
||||||
|
|
||||||
AirtimeInstall::InstallPostgresScriptingLanguage();
|
AirtimeInstall::InstallPostgresScriptingLanguage();
|
||||||
|
|
||||||
if ($databaseExisted){
|
if(isset($argv[1]) && $argv[1] == 'y') {
|
||||||
|
AirtimeInstall::CreateDatabaseTables();
|
||||||
|
}
|
||||||
|
else if ($databaseExisted){
|
||||||
//Database already exists. Ask the user how they want to
|
//Database already exists. Ask the user how they want to
|
||||||
//proceed. Warn them that creating the database tables again
|
//proceed. Warn them that creating the database tables again
|
||||||
//will cause them to lose their old ones.
|
//will cause them to lose their old ones.
|
||||||
|
@ -31,7 +34,8 @@ if ($databaseExisted){
|
||||||
if (in_array($userAnswer, array("y", "Y"))) {
|
if (in_array($userAnswer, array("y", "Y"))) {
|
||||||
AirtimeInstall::CreateDatabaseTables();
|
AirtimeInstall::CreateDatabaseTables();
|
||||||
}
|
}
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
//Database was just created, meaning the tables do not
|
//Database was just created, meaning the tables do not
|
||||||
//exist. Let's create them.
|
//exist. Let's create them.
|
||||||
AirtimeInstall::CreateDatabaseTables();
|
AirtimeInstall::CreateDatabaseTables();
|
||||||
|
|
|
@ -118,7 +118,12 @@ require_once(AirtimeInstall::GetAirtimeSrcDir().'/application/configs/conf.php')
|
||||||
echo "* Airtime Version: ".AIRTIME_VERSION.PHP_EOL;
|
echo "* Airtime Version: ".AIRTIME_VERSION.PHP_EOL;
|
||||||
|
|
||||||
if ($db_install) {
|
if ($db_install) {
|
||||||
require( 'airtime-db-install.php' );
|
if($turnOffPreserve) {
|
||||||
|
system('php airtime-db-install.php y');
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
system('php airtime-db-install.php');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
AirtimeInstall::InstallStorageDirectory();
|
AirtimeInstall::InstallStorageDirectory();
|
||||||
|
@ -139,7 +144,5 @@ system("python ".__DIR__."/../python_apps/show-recorder/install/recorder-install
|
||||||
//echo PHP_EOL."*** Media Monitor Installation ***".PHP_EOL;
|
//echo PHP_EOL."*** Media Monitor Installation ***".PHP_EOL;
|
||||||
//system("python ".__DIR__."/../python_apps/pytag-fs/install/media-monitor-install.py");
|
//system("python ".__DIR__."/../python_apps/pytag-fs/install/media-monitor-install.py");
|
||||||
|
|
||||||
AirtimeInstall::SetAirtimeVersion(AIRTIME_VERSION);
|
|
||||||
|
|
||||||
echo "******************************* Install Complete *******************************".PHP_EOL;
|
echo "******************************* Install Complete *******************************".PHP_EOL;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue