CC-2410: Clean up install process
-fixed missing DB::connect
This commit is contained in:
parent
f755e41a9a
commit
2efe2e67a8
|
@ -149,7 +149,6 @@ class AirtimeInstall
|
|||
$success = chmod($rp, 02777);
|
||||
$CC_CONFIG['storageDir'] = $rp;
|
||||
|
||||
AirtimeInstall::DbConnect(true);
|
||||
//add stor directory to MusiDirs
|
||||
$sql = "INSERT INTO cc_music_dirs (directory, type) VALUES ('$rp', 'stor')";
|
||||
$result = $CC_DBC->query($sql);
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
set_include_path(__DIR__.'/../airtime_mvc/library' . PATH_SEPARATOR . get_include_path());
|
||||
|
||||
require_once(dirname(__FILE__).'/include/AirtimeIni.php');
|
||||
require_once(dirname(__FILE__).'/include/AirtimeInstall.php');
|
||||
require_once(dirname(__FILE__).'/AirtimeIni.php');
|
||||
require_once(dirname(__FILE__).'/AirtimeInstall.php');
|
||||
|
||||
require_once(AirtimeInstall::GetAirtimeSrcDir().'/application/configs/constants.php');
|
||||
require_once(AirtimeInstall::GetAirtimeSrcDir().'/application/configs/conf.php');
|
||||
|
@ -18,10 +18,9 @@ AirtimeInstall::DbConnect(true);
|
|||
|
||||
AirtimeInstall::InstallPostgresScriptingLanguage();
|
||||
|
||||
if(isset($argv[1]) && $argv[1] == 'y') {
|
||||
if (isset($argv[1]) && $argv[1] == 'y') {
|
||||
AirtimeInstall::CreateDatabaseTables();
|
||||
}
|
||||
else if ($databaseExisted){
|
||||
} else if ($databaseExisted) {
|
||||
//Database already exists. Ask the user how they want to
|
||||
//proceed. Warn them that creating the database tables again
|
||||
//will cause them to lose their old ones.
|
||||
|
@ -34,8 +33,7 @@ else if ($databaseExisted){
|
|||
if (in_array($userAnswer, array("y", "Y"))) {
|
||||
AirtimeInstall::CreateDatabaseTables();
|
||||
}
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
//Database was just created, meaning the tables do not
|
||||
//exist. Let's create them.
|
||||
AirtimeInstall::CreateDatabaseTables();
|
|
@ -122,9 +122,9 @@ echo "* Airtime Version: ".AIRTIME_VERSION.PHP_EOL;
|
|||
|
||||
if ($db_install) {
|
||||
if($newInstall) {
|
||||
system('php airtime-db-install.php y');
|
||||
}
|
||||
else {
|
||||
system('php '.__DIR__.'/airtime-db-install.php y');
|
||||
AirtimeInstall::DbConnect(true);
|
||||
} else {
|
||||
require_once('airtime-db-install.php');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -90,6 +90,6 @@ AirtimeInstall::UninstallBinaries();
|
|||
AirtimeInstall::RemoveLogDirectories();
|
||||
AirtimeIni::RemoveMonitFile();
|
||||
|
||||
unlink('/etc/cron.d/airtime-crons');
|
||||
@unlink('/etc/cron.d/airtime-crons');
|
||||
|
||||
/* FINISHED AIRTIME PHP UNINSTALLER */
|
||||
|
|
Loading…
Reference in New Issue