2014-11-28 21:30:11 +01:00
|
|
|
<?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.
|
|
|
|
*/
|
|
|
|
|
2014-12-04 00:04:47 +01:00
|
|
|
$phpDependencies = checkPhpDependencies();
|
2014-12-19 17:44:23 +01:00
|
|
|
$externalServices = checkExternalServices();
|
2014-11-28 21:30:11 +01:00
|
|
|
$zend = $phpDependencies["zend"];
|
|
|
|
$postgres = $phpDependencies["postgres"];
|
|
|
|
|
2014-12-19 17:44:23 +01:00
|
|
|
$database = $externalServices["database"];
|
|
|
|
$rabbitmq = $externalServices["rabbitmq"];
|
2014-11-28 21:30:11 +01:00
|
|
|
|
2014-12-19 17:44:23 +01:00
|
|
|
$pypo = $externalServices["pypo"];
|
|
|
|
$liquidsoap = $externalServices["liquidsoap"];
|
|
|
|
$mediamonitor = $externalServices["media-monitor"];
|
2014-11-28 21:30:11 +01:00
|
|
|
|
2014-12-19 17:44:23 +01:00
|
|
|
$r1 = array_reduce($phpDependencies, "booleanReduce", true);
|
|
|
|
$r2 = array_reduce($externalServices, "booleanReduce", true);
|
|
|
|
$result = $r1 && $r2;
|
2014-11-28 21:30:11 +01:00
|
|
|
?>
|
2014-12-09 23:48:16 +01:00
|
|
|
<html>
|
2014-11-28 21:30:11 +01:00
|
|
|
<head>
|
|
|
|
<link rel="stylesheet" type="text/css" href="css/bootstrap-3.3.1.min.css">
|
2014-12-04 00:04:47 +01:00
|
|
|
<link rel="stylesheet" type="text/css" href="css/setup/config-check.css">
|
2014-11-28 21:30:11 +01:00
|
|
|
</head>
|
2015-01-16 22:15:16 +01:00
|
|
|
<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 0;
|
|
|
|
min-width: 600px;
|
|
|
|
width: 50%;
|
|
|
|
text-align: center;
|
|
|
|
margin: 3em auto;
|
|
|
|
border: 1px solid lightgray;
|
|
|
|
border-radius: 5em;
|
|
|
|
}
|
|
|
|
</style>
|
2014-11-28 21:30:11 +01:00
|
|
|
|
2014-12-09 23:48:16 +01:00
|
|
|
<body>
|
2014-11-28 21:30:11 +01:00
|
|
|
<h2>
|
2014-12-09 23:48:16 +01:00
|
|
|
<img class="logo" src="css/images/airtime_logo_jp.png" /><br/>
|
2014-11-28 21:30:11 +01:00
|
|
|
<strong>Configuration Checklist</strong>
|
|
|
|
</h2>
|
2014-12-09 23:48:16 +01:00
|
|
|
<table class="table">
|
2014-11-28 21:30:11 +01:00
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<td class="component">
|
|
|
|
Component
|
|
|
|
</td>
|
|
|
|
<td class="description">
|
2014-12-15 15:49:00 +01:00
|
|
|
<strong>Description</strong>
|
2014-11-28 21:30:11 +01:00
|
|
|
</td>
|
|
|
|
<td class="solution">
|
2014-12-15 15:49:00 +01:00
|
|
|
<strong>Solution</strong>
|
2014-11-28 21:30:11 +01:00
|
|
|
</td>
|
|
|
|
</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>
|
2014-12-09 23:48:16 +01:00
|
|
|
<td class="solution <?php if ($zend) {echo 'check';?>">
|
2014-11-28 21:30:11 +01:00
|
|
|
<?php
|
|
|
|
} else {
|
2014-12-09 23:48:16 +01:00
|
|
|
?>">
|
2014-11-28 21:30:11 +01:00
|
|
|
<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>
|
2014-12-09 23:48:16 +01:00
|
|
|
<td class="solution <?php if ($postgres) {echo 'check';?>">
|
2014-11-28 21:30:11 +01:00
|
|
|
<?php
|
|
|
|
} else {
|
2014-12-09 23:48:16 +01:00
|
|
|
?>">
|
2014-11-28 21:30:11 +01:00
|
|
|
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>
|
2014-12-09 23:48:16 +01:00
|
|
|
<td class="solution <?php if ($database) {echo 'check';?>">
|
2014-11-28 21:30:11 +01:00
|
|
|
<?php
|
|
|
|
} else {
|
2014-12-09 23:48:16 +01:00
|
|
|
?>">
|
2014-11-28 21:30:11 +01:00
|
|
|
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
|
2014-12-16 18:24:41 +01:00
|
|
|
<code>/etc/airtime.conf</code> are correct and the Airtime database was installed correctly.
|
2014-11-28 21:30:11 +01:00
|
|
|
<?php
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
</td>
|
|
|
|
</tr>
|
2014-12-19 17:44:23 +01:00
|
|
|
<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 {
|
|
|
|
?>">
|
2015-01-09 00:52:58 +01:00
|
|
|
Check that the airtime-media-monitor service is installed correctly in <code>/etc/init</code>,
|
2015-01-14 22:11:49 +01:00
|
|
|
and ensure that it's running with
|
|
|
|
<br/><code>initctl list | grep airtime-media-monitor</code><br/>
|
|
|
|
If not, try <br/><code>sudo service airtime-media-monitor start</code>
|
2014-12-19 17:44:23 +01:00
|
|
|
<?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 {
|
|
|
|
?>">
|
2015-01-14 22:11:49 +01:00
|
|
|
Check that the airtime-playout service is installed correctly in <code>/etc/init</code>,
|
|
|
|
and ensure that it's running with
|
2015-01-19 21:05:13 +01:00
|
|
|
<br/><code>initctl list | grep airtime-playout</code><br/>
|
2015-01-14 22:11:49 +01:00
|
|
|
If not, try <br/><code>sudo service airtime-playout restart</code>
|
2014-12-19 17:44:23 +01:00
|
|
|
<?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 {
|
|
|
|
?>">
|
2015-01-14 22:11:49 +01:00
|
|
|
Check that the airtime-liquidsoap service is installed correctly in <code>/etc/init</code>,
|
|
|
|
and ensure that it's running with
|
2015-01-19 21:05:13 +01:00
|
|
|
<br/><code>initctl list | grep airtime-liquidsoap</code><br/>
|
2015-01-14 22:11:49 +01:00
|
|
|
If not, try <br/><code>sudo service airtime-liquidsoap restart</code>
|
2014-12-19 17:44:23 +01:00
|
|
|
<?php
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
</td>
|
|
|
|
</tr>
|
2014-11-28 21:30:11 +01:00
|
|
|
</tbody>
|
|
|
|
</table>
|
2014-12-09 23:48:16 +01:00
|
|
|
</div>
|
2014-11-28 21:30:11 +01:00
|
|
|
<?php
|
|
|
|
if (!$result) {
|
|
|
|
?>
|
2014-12-19 17:44:23 +01:00
|
|
|
<br/>
|
2014-12-19 17:58:47 +01:00
|
|
|
<strong>Looks like something went wrong!</strong>
|
2014-11-28 21:30:11 +01:00
|
|
|
<p>
|
2014-12-19 17:58:47 +01:00
|
|
|
If you've tried everything we've recommended above and are still experiencing issues, come
|
|
|
|
<a href="https://forum.sourcefabric.org/">visit our forums</a>
|
2014-11-28 21:30:11 +01:00
|
|
|
or <a href="http://www.sourcefabric.org/en/airtime/manuals/">check out the manual</a>.
|
|
|
|
</p>
|
|
|
|
<?php
|
|
|
|
} else {
|
|
|
|
?>
|
|
|
|
<p>
|
2014-12-19 17:44:23 +01:00
|
|
|
Your Airtime station is up and running! Get started by logging in with the default username and password: admin/admin
|
2014-11-28 21:30:11 +01:00
|
|
|
</p>
|
2014-12-15 15:49:00 +01:00
|
|
|
<button onclick="location = location.pathname;">Log in to Airtime!</button>
|
2014-11-28 21:30:11 +01:00
|
|
|
<?php
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
<div class="footer">
|
|
|
|
<h3>
|
|
|
|
PHP Extension List
|
|
|
|
</h3>
|
|
|
|
<p>
|
|
|
|
<?php
|
2014-12-01 21:49:53 +01:00
|
|
|
global $extensions;
|
2014-12-16 18:24:41 +01:00
|
|
|
$first = true;
|
2014-11-28 21:30:11 +01:00
|
|
|
foreach ($extensions as $ext) {
|
2014-12-16 18:24:41 +01:00
|
|
|
if (!$first) {
|
|
|
|
echo " | ";
|
|
|
|
} else {
|
|
|
|
$first = false;
|
|
|
|
}
|
|
|
|
echo $ext;
|
2014-11-28 21:30:11 +01:00
|
|
|
}
|
|
|
|
?>
|
|
|
|
</p>
|
|
|
|
</div>
|