feat: change config filename to config.yml
BREAKING: The configuration file name changed from `airtime.conf` to `config.yml`. Please rename your configuration file accordingly.
This commit is contained in:
parent
e4439390fe
commit
604ff20239
23 changed files with 40 additions and 34 deletions
|
@ -55,8 +55,8 @@ class MediaSetup extends Setup
|
|||
|
||||
/*
|
||||
* If we're upgrading from an old Airtime instance (pre-2.5.2) we rename their old
|
||||
* airtime.conf to airtime.conf.tmp during the setup process. Now that we're done,
|
||||
* we can rename it to airtime.conf.bak to avoid confusion.
|
||||
* config.yml to config.yml.tmp during the setup process. Now that we're done,
|
||||
* we can rename it to config.yml.bak to avoid confusion.
|
||||
*/
|
||||
$fileName = LIBRETIME_CONFIG_FILEPATH;
|
||||
$tmpFile = $fileName . '.tmp';
|
||||
|
@ -65,7 +65,7 @@ class MediaSetup extends Setup
|
|||
rename($tmpFile, $bakFile);
|
||||
}
|
||||
} else {
|
||||
self::$message = "Failed to move airtime.conf; /etc/airtime doesn't exist!";
|
||||
self::$message = "Failed to move config.yml; /etc/airtime doesn't exist!";
|
||||
self::$errors[] = 'ERR';
|
||||
}
|
||||
|
||||
|
@ -76,7 +76,7 @@ class MediaSetup extends Setup
|
|||
}
|
||||
|
||||
/**
|
||||
* Moves /tmp/airtime.temp.conf to /etc/airtime.conf and then removes it to complete setup.
|
||||
* Moves /tmp/airtime.temp.conf to /etc/airtime/config.yml and then removes it to complete setup.
|
||||
*
|
||||
* @return bool false if either of the copy or removal operations fail
|
||||
*/
|
||||
|
|
|
@ -10,10 +10,10 @@
|
|||
*/
|
||||
class RabbitMQSetup extends Setup
|
||||
{
|
||||
// airtime.conf section header
|
||||
// config.yml section header
|
||||
protected static $_section = '[rabbitmq]';
|
||||
|
||||
// Array of key->value pairs for airtime.conf
|
||||
// Array of key->value pairs for config.yml
|
||||
protected static $_properties;
|
||||
|
||||
// Constant form field names for passing errors back to the front-end
|
||||
|
|
|
@ -14,7 +14,7 @@ abstract class Setup
|
|||
protected static $_section;
|
||||
|
||||
/**
|
||||
* Array of key->value pairs for airtime.conf.
|
||||
* Array of key->value pairs for config.yml.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
|
@ -51,7 +51,7 @@ abstract class Setup
|
|||
}
|
||||
|
||||
if (substr(trim($line), 0, 1) == '#') {
|
||||
/* Workaround to strip comments from airtime.conf.
|
||||
/* Workaround to strip comments from config.yml.
|
||||
* We need to do this because python's ConfigObj and PHP
|
||||
* have different (and equally strict) rules about comment
|
||||
* characters in configuration files.
|
||||
|
@ -123,8 +123,8 @@ require_once 'general-setup.php';
|
|||
|
||||
require_once 'media-setup.php';
|
||||
|
||||
// If airtime.conf exists, we shouldn't be here
|
||||
if (!file_exists('/etc/airtime/airtime.conf')) {
|
||||
// If config.yml exists, we shouldn't be here
|
||||
if (!file_exists('/etc/airtime/config.yml')) {
|
||||
if (isset($_GET['obj']) && $objType = $_GET['obj']) {
|
||||
$obj = new $objType($_POST);
|
||||
if ($obj instanceof Setup) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue