예제 #1
0
 /**
  * After the configuration files have been copied to /etc/airtime,
  * this function will update them to values unique to this
  * particular installation.
  */
 private static function UpdateIniFiles()
 {
     $ini = parse_ini_file(UpgradeCommon::CONF_FILE_AIRTIME, true);
     $ini['rabbitmq']['vhost'] = '/airtime';
     $ini['rabbitmq']['user'] = '******';
     $ini['rabbitmq']['password'] = UpgradeCommon::GenerateRandomString();
     UpgradeCommon::write_ini_file($ini, UpgradeCommon::CONF_FILE_AIRTIME, true);
 }
예제 #2
0
 public static function start()
 {
     UpgradeCommon::upgradeConfigFiles();
 }
예제 #3
0
 public static function start()
 {
     echo "* Updating configFiles\n";
     self::changeConfigFilePermissions();
     UpgradeCommon::upgradeConfigFiles();
 }
예제 #4
0
 */
/*
function get_conf_location(){
    $conf = parse_ini_file("/etc/airtime/airtime.conf", TRUE);
    $airtime_dir = $conf['general']['airtime_dir'];
    return $airtime_dir."/"."application/configs/conf.php";
}
* */
// Define path to application directory
defined('APPLICATION_PATH') || define('APPLICATION_PATH', realpath(__DIR__ . '/../../../airtime_mvc/application'));
// Ensure library is on include_path
set_include_path(implode(PATH_SEPARATOR, array(get_include_path(), realpath(APPLICATION_PATH . '/../library'))));
//Propel classes.
set_include_path(APPLICATION_PATH . '/models' . PATH_SEPARATOR . get_include_path());
include_once 'propel/runtime/lib/Propel.php';
Propel::init(__DIR__ . "/propel/airtime-conf.php");
//$conf_path = get_conf_location();
//require_once $conf_path;
set_include_path(__DIR__ . '/../../../airtime_mvc/library' . PATH_SEPARATOR . get_include_path());
require_once 'propel/runtime/lib/Propel.php';
require_once 'common/UpgradeCommon.php';
require_once 'ConfFileUpgrade.php';
require_once 'DbUpgrade.php';
require_once 'MiscUpgrade.php';
$filename = "/etc/airtime/airtime.conf";
$values = parse_ini_file($filename, true);
UpgradeCommon::connectToDatabase();
UpgradeCommon::SetDefaultTimezone();
AirtimeConfigFileUpgrade::start();
AirtimeDatabaseUpgrade::start($values);
AirtimeMiscUpgrade::start($values);
예제 #5
0
 private static function task0()
 {
     UpgradeCommon::upgradeConfigFiles();
 }