More work on web installer
This commit is contained in:
parent
9fed113f74
commit
f5b4928538
23 changed files with 728 additions and 186 deletions
|
@ -1,52 +1,31 @@
|
|||
<?php
|
||||
date_default_timezone_set("UTC");
|
||||
|
||||
$values = parse_ini_file('/etc/airtime/airtime.conf', true);
|
||||
$webRoot = apache_getenv("DOCUMENT_ROOT");
|
||||
//require_once $webRoot . "/../application/configs/conf.php";
|
||||
//$CC_CONFIG = Config::getConfig();
|
||||
|
||||
// Name of the web server user
|
||||
$CC_CONFIG['webServerUser'] = $values['general']['web_server_user'];
|
||||
$CC_CONFIG['phpDir'] = $values['general']['airtime_dir'];
|
||||
$CC_CONFIG['rabbitmq'] = $values['rabbitmq'];
|
||||
|
||||
$CC_CONFIG['baseUrl'] = $values['general']['base_url'];
|
||||
$CC_CONFIG['basePort'] = $values['general']['base_port'];
|
||||
|
||||
// Database config
|
||||
$CC_CONFIG['dsn']['username'] = $values['database']['dbuser'];
|
||||
$CC_CONFIG['dsn']['password'] = $values['database']['dbpass'];
|
||||
$CC_CONFIG['dsn']['hostspec'] = $values['database']['host'];
|
||||
$CC_CONFIG['dsn']['phptype'] = 'pgsql';
|
||||
$CC_CONFIG['dsn']['database'] = $values['database']['dbname'];
|
||||
|
||||
$CC_CONFIG['soundcloud-connection-retries'] = $values['soundcloud']['connection_retries'];
|
||||
$CC_CONFIG['soundcloud-connection-wait'] = $values['soundcloud']['time_between_retries'];
|
||||
|
||||
require_once($CC_CONFIG['phpDir'].'/application/configs/constants.php');
|
||||
require_once($CC_CONFIG['phpDir'].'/application/configs/conf.php');
|
||||
|
||||
$CC_CONFIG['phpDir'] = $values['general']['airtime_dir'];
|
||||
require_once($webRoot.'/application/configs/constants.php');
|
||||
require_once($webRoot.'/application/configs/conf.php');
|
||||
|
||||
// Ensure library/ is on include_path
|
||||
set_include_path(implode(PATH_SEPARATOR, array(
|
||||
get_include_path(),
|
||||
realpath($CC_CONFIG['phpDir'] . '/library')
|
||||
realpath($webRoot . '/library')
|
||||
)));
|
||||
|
||||
require_once($CC_CONFIG['phpDir'].'/application/common/Database.php');
|
||||
require_once($CC_CONFIG['phpDir'].'/application/models/StoredFile.php');
|
||||
require_once($CC_CONFIG['phpDir'].'/application/models/Preference.php');
|
||||
require_once($CC_CONFIG['phpDir'].'/application/models/MusicDir.php');
|
||||
require_once($CC_CONFIG['phpDir'].'/application/common/OsPath.php');
|
||||
require_once($webRoot.'/application/common/Database.php');
|
||||
require_once($webRoot.'/application/models/StoredFile.php');
|
||||
require_once($webRoot.'/application/models/Preference.php');
|
||||
require_once($webRoot.'/application/models/MusicDir.php');
|
||||
require_once($webRoot.'/application/common/OsPath.php');
|
||||
|
||||
set_include_path($CC_CONFIG['phpDir'].'/library' . PATH_SEPARATOR . get_include_path());
|
||||
require_once($CC_CONFIG['phpDir'].'/application/models/Soundcloud.php');
|
||||
|
||||
set_include_path($CC_CONFIG['phpDir']."/application/models" . PATH_SEPARATOR . get_include_path());
|
||||
require_once($CC_CONFIG['phpDir']."/library/propel/runtime/lib/Propel.php");
|
||||
Propel::init($CC_CONFIG['phpDir']."/application/configs/airtime-conf.php");
|
||||
set_include_path($webRoot.'/library' . PATH_SEPARATOR . get_include_path());
|
||||
require_once($webRoot.'/application/models/Soundcloud.php');
|
||||
|
||||
set_include_path($webRoot."/application/models" . PATH_SEPARATOR . get_include_path());
|
||||
require_once 'propel/runtime/lib/Propel.php';
|
||||
Propel::init($CC_CONFIG['phpDir']."/application/configs/airtime-conf-production.php");
|
||||
Propel::init($webRoot."/application/configs/airtime-conf-production.php");
|
||||
|
||||
if(count($argv) != 2){
|
||||
exit;
|
||||
|
@ -58,4 +37,3 @@ $file = Application_Model_StoredFile::RecallById($id);
|
|||
// set id with -2 which is indicator for processing
|
||||
$file->setSoundCloudFileId(SOUNDCLOUD_PROGRESS);
|
||||
$file->uploadToSoundCloud();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue