feat(legacy): consolidate constants (#1558)
* remove unused file * fix paths leading slash * remove useless imports * refactor(legacy): use constants everywhere * fix path leading slash * remove useless import * consolidate legacy contants * format code * reuse LIBRETIME_CONFIG_DIR * fix test config path * remove ci legacy log dir creation * some logs improvements
This commit is contained in:
parent
e106858fd8
commit
729a7b99e0
34 changed files with 133 additions and 257 deletions
|
@ -1,9 +1,9 @@
|
|||
<?php
|
||||
$tempConfigPath = '/etc/airtime/airtime.conf.tmp';
|
||||
if (file_exists($tempConfigPath)) {
|
||||
$airtimeConfig = parse_ini_file($tempConfigPath, true);
|
||||
$db = $airtimeConfig['database'];
|
||||
}
|
||||
$tempConfigPath = INSTALLER_CONFIG_FILEPATH;
|
||||
if (file_exists($tempConfigPath)) {
|
||||
$airtimeConfig = parse_ini_file($tempConfigPath, true);
|
||||
$db = $airtimeConfig['database'];
|
||||
}
|
||||
?>
|
||||
|
||||
<form action="#" role="form" id="dbSettingsForm">
|
||||
|
|
|
@ -11,16 +11,16 @@
|
|||
sudo systemctl start libretime-api
|
||||
sudo systemctl start libretime-celery
|
||||
sudo systemctl start libretime-liquidsoap
|
||||
sudo systemctl start libretime-playout</pre
|
||||
sudo systemctl start libretime-playout</pre>
|
||||
<p>
|
||||
Click "Done!" to bring up the Libretime configuration checklist; if your configuration is all green,
|
||||
you're ready to get started with your personal Libretime station!
|
||||
</p>
|
||||
<p>
|
||||
If you need to re-run the web installer, just remove <code>/etc/airtime/airtime.conf</code>.
|
||||
If you need to re-run the web installer, just remove <code><?php echo LIBRETIME_CONFIG_FILEPATH; ?></code>.
|
||||
</p>
|
||||
<div>
|
||||
<input type="submit" formtarget="finishSettingsForm" class="btn btn-primary btn-next" value="Done!"/>
|
||||
<input type="submit" formtarget="finishSettingsForm" class="btn btn-primary btn-next" value="Done!" />
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<?php
|
||||
$tempConfigPath = '/etc/airtime/airtime.conf.tmp';
|
||||
if (file_exists($tempConfigPath)) {
|
||||
$airtimeConfig = parse_ini_file($tempConfigPath, true);
|
||||
$rmq = $airtimeConfig['rabbitmq'];
|
||||
}
|
||||
$tempConfigPath = INSTALLER_CONFIG_FILEPATH;
|
||||
if (file_exists($tempConfigPath)) {
|
||||
$airtimeConfig = parse_ini_file($tempConfigPath, true);
|
||||
$rmq = $airtimeConfig['rabbitmq'];
|
||||
}
|
||||
?>
|
||||
|
||||
<form action="#" role="form" id="rmqSettingsForm">
|
||||
|
|
|
@ -92,7 +92,7 @@ function checkDatabaseConfiguration()
|
|||
*/
|
||||
function configureDatabase()
|
||||
{
|
||||
Propel::init(CONFIG_PATH . 'airtime-conf-production.php');
|
||||
Propel::init(PROPEL_CONFIG_FILEPATH);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -102,11 +102,11 @@ function configureDatabase()
|
|||
*/
|
||||
function checkRMQConnection()
|
||||
{
|
||||
// Check for airtime.conf in /etc/airtime/ first, then check in the build directory,
|
||||
if (file_exists(AIRTIME_CONFIG_STOR . AIRTIME_CONFIG)) {
|
||||
$ini = parse_ini_file(AIRTIME_CONFIG_STOR . AIRTIME_CONFIG, true);
|
||||
// Check for installed config file first, then check in the build directory,
|
||||
if (file_exists(LIBRETIME_CONFIG_FILEPATH)) {
|
||||
$ini = parse_ini_file(LIBRETIME_CONFIG_FILEPATH, true);
|
||||
} else {
|
||||
$ini = parse_ini_file(BUILD_PATH . 'airtime.example.conf', true);
|
||||
$ini = parse_ini_file(SAMPLE_CONFIG_FILEPATH, true);
|
||||
}
|
||||
|
||||
$conn = new \PhpAmqpLib\Connection\AMQPStreamConnection(
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
<?php
|
||||
|
||||
require_once dirname(__DIR__, 2) . '/application/preload.php';
|
||||
|
||||
?>
|
||||
|
||||
<html>
|
||||
|
@ -23,27 +26,27 @@
|
|||
<div class="form-slider">
|
||||
<div id="databaseSettings" class="form-wrapper">
|
||||
<?php
|
||||
require_once SETUP_PATH . 'forms/database-settings.php';
|
||||
require_once SETUP_PATH . '/forms/database-settings.php';
|
||||
?>
|
||||
</div>
|
||||
<div id="rabbitmqSettings" class="form-wrapper">
|
||||
<?php
|
||||
require_once SETUP_PATH . 'forms/rabbitmq-settings.php';
|
||||
require_once SETUP_PATH . '/forms/rabbitmq-settings.php';
|
||||
?>
|
||||
</div>
|
||||
<div id="generalSettings" class="form-wrapper">
|
||||
<?php
|
||||
require_once SETUP_PATH . 'forms/general-settings.php';
|
||||
require_once SETUP_PATH . '/forms/general-settings.php';
|
||||
?>
|
||||
</div>
|
||||
<div id="mediaSettings" class="form-wrapper">
|
||||
<?php
|
||||
require_once SETUP_PATH . 'forms/media-settings.php';
|
||||
require_once SETUP_PATH . '/forms/media-settings.php';
|
||||
?>
|
||||
</div>
|
||||
<div id="finishSettings" class="form-wrapper">
|
||||
<?php
|
||||
require_once SETUP_PATH . 'forms/finish-settings.php';
|
||||
require_once SETUP_PATH . '/forms/finish-settings.php';
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue