Merge branch '2.5.x-installer' into saas-installer-albert
Conflicts: .gitignore airtime_mvc/application/Bootstrap.php airtime_mvc/application/configs/conf.php airtime_mvc/application/controllers/SystemstatusController.php airtime_mvc/application/controllers/UpgradeController.php airtime_mvc/application/upgrade/Upgrades.php airtime_mvc/application/views/scripts/systemstatus/index.phtml airtime_mvc/build/airtime.conf airtime_mvc/build/sql/defaultdata.sql airtime_mvc/public/index.php airtime_mvc/tests/application/helpers/AirtimeInstall.php install_minimal/airtime-install install_minimal/include/airtime-constants.php install_minimal/include/airtime-copy-files.sh install_minimal/include/airtime-db-install.php install_minimal/include/airtime-initialize.sh install_minimal/include/airtime-install.php install_minimal/include/airtime-installed-check.php install_minimal/include/airtime-remove-files.sh install_minimal/include/airtime-upgrade.php python_apps/media-monitor/install/media-monitor-copy-files.py python_apps/monit/monit-airtime-generic.cfg python_apps/pypo/airtime-playout python_apps/pypo/install/pypo-copy-files.py python_apps/pypo/liquidsoap/generate_liquidsoap_cfg.py python_apps/pypo/liquidsoap/ls_script.liq python_apps/pypo/pypo/__main__.py python_apps/pypo/pypo/media/update/replaygain.py python_apps/pypo/pypo/media/update/replaygainupdater.py python_apps/pypo/pypo/media/update/silananalyzer.py python_apps/python-virtualenv/airtime_virtual_env.pybundle python_apps/python-virtualenv/requirements utils/airtime-check-system.php
This commit is contained in:
commit
11c6818e61
335 changed files with 5114 additions and 10061 deletions
|
@ -2,8 +2,6 @@
|
|||
/* THIS FILE IS NOT MEANT FOR CUSTOMIZING.
|
||||
* PLEASE EDIT THE FOLLOWING TO CHANGE YOUR CONFIG:
|
||||
* /etc/airtime/airtime.conf
|
||||
* /etc/airtime/pypo.cfg
|
||||
* /etc/airtime/recorder.cfg
|
||||
*/
|
||||
|
||||
class Config {
|
||||
|
@ -37,7 +35,6 @@ class Config {
|
|||
$CC_CONFIG['baseDir'] = $values['general']['base_dir'];
|
||||
$CC_CONFIG['baseUrl'] = $values['general']['base_url'];
|
||||
$CC_CONFIG['basePort'] = $values['general']['base_port'];
|
||||
$CC_CONFIG['phpDir'] = $values['general']['airtime_dir'];
|
||||
if (isset($values['general']['dev_env'])) {
|
||||
$CC_CONFIG['dev_env'] = $values['general']['dev_env'];
|
||||
} else {
|
||||
|
@ -68,12 +65,9 @@ class Config {
|
|||
// Tells us where file uploads will be uploaded to.
|
||||
// It will either be set to a cloud storage backend or local file storage.
|
||||
$CC_CONFIG["current_backend"] = $cloudStorageValues["current_backend"]["storage_backend"];
|
||||
|
||||
|
||||
$CC_CONFIG['cache_ahead_hours'] = $values['general']['cache_ahead_hours'];
|
||||
|
||||
$CC_CONFIG['monit_user'] = $values['monit']['monit_user'];
|
||||
$CC_CONFIG['monit_password'] = $values['monit']['monit_password'];
|
||||
|
||||
// Database config
|
||||
$CC_CONFIG['dsn']['username'] = $values['database']['dbuser'];
|
||||
$CC_CONFIG['dsn']['password'] = $values['database']['dbpass'];
|
||||
|
|
265
airtime_mvc/application/configs/config-check.php
Normal file
265
airtime_mvc/application/configs/config-check.php
Normal file
|
@ -0,0 +1,265 @@
|
|||
<?php
|
||||
/*
|
||||
* We only get here after setup, or if there's an error in the configuration.
|
||||
*
|
||||
* Display a table to the user showing the necessary dependencies
|
||||
* (both PHP and binary) and the status of any application services,
|
||||
* along with steps to fix them if they're not found or misconfigured.
|
||||
*/
|
||||
|
||||
$phpDependencies = checkPhpDependencies();
|
||||
$externalServices = checkExternalServices();
|
||||
$zend = $phpDependencies["zend"];
|
||||
$postgres = $phpDependencies["postgres"];
|
||||
|
||||
$database = $externalServices["database"];
|
||||
$rabbitmq = $externalServices["rabbitmq"];
|
||||
|
||||
$pypo = $externalServices["pypo"];
|
||||
$liquidsoap = $externalServices["liquidsoap"];
|
||||
$mediamonitor = $externalServices["media-monitor"];
|
||||
|
||||
$r1 = array_reduce($phpDependencies, "booleanReduce", true);
|
||||
$r2 = array_reduce($externalServices, "booleanReduce", true);
|
||||
$result = $r1 && $r2;
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" type="text/css" href="css/bootstrap-3.3.1.min.css">
|
||||
<link rel="stylesheet" type="text/css" href="css/setup/config-check.css">
|
||||
</head>
|
||||
<style>
|
||||
/*
|
||||
This is here because we're using the config-check css for
|
||||
both this page and the system status page
|
||||
*/
|
||||
html {
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
|
||||
body {
|
||||
padding: 2em;
|
||||
min-width: 600px;
|
||||
text-align: center;
|
||||
margin: 3em ;
|
||||
border: 1px solid lightgray;
|
||||
border-radius: 5px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<body>
|
||||
<h2>
|
||||
<img class="logo" src="css/images/airtime_logo_jp.png" /><br/>
|
||||
<strong>Configuration Checklist</strong>
|
||||
</h2>
|
||||
|
||||
<?php
|
||||
if (!$result) {
|
||||
?>
|
||||
<br/>
|
||||
<h3 class="error">Looks like something went wrong!</h3>
|
||||
<p>
|
||||
Take a look at the checklist below for possible solutions. If you're tried the suggestions and are
|
||||
still experiencing issues, come
|
||||
<a href="https://forum.sourcefabric.org/">visit our forums</a>
|
||||
or <a href="http://www.sourcefabric.org/en/airtime/manuals/">check out the manual</a>.
|
||||
</p>
|
||||
<?php
|
||||
} else {
|
||||
?>
|
||||
<p>
|
||||
Your Airtime station is up and running! Get started by logging in with the default username and password: admin/admin
|
||||
</p>
|
||||
<button onclick="location = location.pathname;">Log in to Airtime!</button>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="component">
|
||||
Component
|
||||
</th>
|
||||
<th class="description">
|
||||
<strong>Description</strong>
|
||||
</th>
|
||||
<th class="solution">
|
||||
<strong>Status or Solution</strong>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
|
||||
<div class="checklist">
|
||||
<table class="table table-striped">
|
||||
<caption class="caption">
|
||||
PHP Dependencies
|
||||
</caption>
|
||||
<tbody>
|
||||
<tr class="<?=$zend ? 'success' : 'danger';?>">
|
||||
<td class="component">
|
||||
Zend
|
||||
</td>
|
||||
<td class="description">
|
||||
Zend MVC Framework
|
||||
</td>
|
||||
<td class="solution <?php if ($zend) {echo 'check';?>">
|
||||
<?php
|
||||
} else {
|
||||
?>">
|
||||
<b>Ubuntu</b>: try running <code>sudo apt-get install libzend-framework-php</code>
|
||||
<br/><b>Debian</b>: try running <code>sudo apt-get install zendframework</code>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="<?=$postgres ? 'success' : 'danger';?>">
|
||||
<td class="component">
|
||||
Postgres
|
||||
</td>
|
||||
<td class="description">
|
||||
PDO and PostgreSQL libraries
|
||||
</td>
|
||||
<td class="solution <?php if ($postgres) {echo 'check';?>">
|
||||
<?php
|
||||
} else {
|
||||
?>">
|
||||
Try running <code>sudo apt-get install php5-pgsql</code>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<table class="table table-striped">
|
||||
<caption class="caption">
|
||||
External Services
|
||||
</caption>
|
||||
<tbody>
|
||||
<tr class="<?=$database ? 'success' : 'danger';?>">
|
||||
<td class="component">
|
||||
Database
|
||||
</td>
|
||||
<td class="description">
|
||||
Database configuration for Airtime
|
||||
</td>
|
||||
<td class="solution <?php if ($database) {echo 'check';?>">
|
||||
<?php
|
||||
} else {
|
||||
?>">
|
||||
Make sure you aren't missing any of the Postgres dependencies in the table above.
|
||||
If your dependencies check out, make sure your database configuration settings in
|
||||
<code>/etc/airtime.conf</code> are correct and the Airtime database was installed correctly.
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="<?=$rabbitmq ? 'success' : 'danger';?>">
|
||||
<td class="component">
|
||||
RabbitMQ
|
||||
</td>
|
||||
<td class="description">
|
||||
RabbitMQ configuration for Airtime
|
||||
</td>
|
||||
<td class="solution <?php if ($rabbitmq) {echo 'check';?>">
|
||||
<?php
|
||||
} else {
|
||||
?>">
|
||||
Make sure RabbitMQ is installed correctly, and that your settings in /etc/airtime/airtime.conf
|
||||
are correct. Try using <code>sudo rabbitmqctl list_users</code> and <code>sudo rabbitmqctl list_vhosts</code>
|
||||
to see if the airtime user (or your custom RabbitMQ user) exists, then checking that
|
||||
<code>sudo rabbitmqctl list_exchanges</code> contains entries for airtime-media-monitor, airtime-pypo,
|
||||
and airtime-uploads.
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="<?=$mediamonitor ? 'success' : 'danger';?>">
|
||||
<td class="component">
|
||||
Media Monitor
|
||||
</td>
|
||||
<td class="description">
|
||||
Airtime media-monitor service
|
||||
</td>
|
||||
<td class="solution <?php if ($mediamonitor) {echo 'check';?>">
|
||||
<?php
|
||||
} else {
|
||||
?>">
|
||||
Check that the airtime-media-monitor service is installed correctly in <code>/etc/init</code>,
|
||||
and ensure that it's running with
|
||||
<br/><code>initctl list | grep airtime-media-monitor</code><br/>
|
||||
If not, try running <code>sudo service airtime-media-monitor start</code>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="<?=$pypo ? 'success' : 'danger';?>">
|
||||
<td class="component">
|
||||
Pypo
|
||||
</td>
|
||||
<td class="description">
|
||||
Airtime playout service
|
||||
</td>
|
||||
<td class="solution <?php if ($pypo) {echo 'check';?>">
|
||||
<?php
|
||||
} else {
|
||||
?>">
|
||||
Check that the airtime-playout service is installed correctly in <code>/etc/init</code>,
|
||||
and ensure that it's running with
|
||||
<br/><code>initctl list | grep airtime-playout</code><br/>
|
||||
If not, try running <code>sudo service airtime-playout restart</code>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="<?=$liquidsoap ? 'success' : 'danger';?>">
|
||||
<td class="component">
|
||||
Liquidsoap
|
||||
</td>
|
||||
<td class="description">
|
||||
Airtime liquidsoap service
|
||||
</td>
|
||||
<td class="solution <?php if ($liquidsoap) {echo 'check';?>">
|
||||
<?php
|
||||
} else {
|
||||
?>">
|
||||
Check that the airtime-liquidsoap service is installed correctly in <code>/etc/init</code>,
|
||||
and ensure that it's running with
|
||||
<br/><code>initctl list | grep airtime-liquidsoap</code><br/>
|
||||
If not, try running <code>sudo service airtime-liquidsoap restart</code>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="footer">
|
||||
<h3>
|
||||
PHP Extension List
|
||||
</h3>
|
||||
<p>
|
||||
<?php
|
||||
global $extensions;
|
||||
$first = true;
|
||||
foreach ($extensions as $ext) {
|
||||
if (!$first) {
|
||||
echo " | ";
|
||||
} else {
|
||||
$first = false;
|
||||
}
|
||||
echo $ext;
|
||||
}
|
||||
?>
|
||||
</p>
|
||||
</div>
|
|
@ -19,6 +19,7 @@ define('LICENSE_URL' , 'http://www.gnu.org/licenses/agpl-3.0-standalone.h
|
|||
define('AIRTIME_COPYRIGHT_DATE' , '2010-2012');
|
||||
define('AIRTIME_REST_VERSION' , '1.1');
|
||||
define('AIRTIME_API_VERSION' , '1.1');
|
||||
define('AIRTIME_CODE_VERSION' , '2.5.2');
|
||||
|
||||
// Metadata Keys for files
|
||||
define('MDATA_KEY_FILEPATH' , 'filepath');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue