CC-2281 Install script should check for pre-installed versions and prompt user to upgrade/full installation
more checks for a new install, reinstalling.
This commit is contained in:
parent
5065b1807f
commit
62a54da1e3
2 changed files with 26 additions and 5 deletions
|
@ -38,7 +38,13 @@ class AirtimeInstall
|
|||
{
|
||||
global $CC_DBC, $CC_CONFIG;
|
||||
|
||||
$values = parse_ini_file('/etc/airtime/airtime.conf', true);
|
||||
if(file_exists('/etc/airtime/airtime.conf')) {
|
||||
$values = parse_ini_file('/etc/airtime/airtime.conf', true);
|
||||
}
|
||||
else {
|
||||
echo "New Airtime Install.".PHP_EOL;
|
||||
return null;
|
||||
}
|
||||
|
||||
// Database config
|
||||
$CC_CONFIG['dsn']['username'] = $values['database']['dbuser'];
|
||||
|
@ -50,6 +56,7 @@ class AirtimeInstall
|
|||
$CC_DBC = DB::connect($CC_CONFIG['dsn'], FALSE);
|
||||
if (PEAR::isError($CC_DBC)) {
|
||||
echo "New Airtime Install.".PHP_EOL;
|
||||
return null;
|
||||
}
|
||||
else {
|
||||
$CC_DBC->setFetchMode(DB_FETCHMODE_ASSOC);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue