feat(legacy): disable services check when missing systemctl (#2160)

This commit is contained in:
Jonas L 2022-09-19 11:56:56 +02:00 committed by GitHub
parent 74539f75d8
commit 1edcbc0657
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 224 additions and 204 deletions

View file

@ -10,11 +10,14 @@ $postgres = $phpDependencies["postgres"];
$database = $externalServices["database"];
$rabbitmq = $externalServices["rabbitmq"];
$pypo = $externalServices["pypo"];
$liquidsoap = $externalServices["liquidsoap"];
$analyzer = $externalServices["analyzer"];
$celery = $externalServices['celery'];
$api = $externalServices['api'];
$systemd = with_systemd();
if ($systemd) {
$pypo = $externalServices['pypo'];
$liquidsoap = $externalServices['liquidsoap'];
$analyzer = $externalServices['analyzer'];
$celery = $externalServices['celery'];
$api = $externalServices['api'];
}
$r1 = array_reduce($phpDependencies, "booleanReduce", true);
$r2 = array_reduce($externalServices, "booleanReduce", true);
@ -94,111 +97,113 @@ $result = $r1 && $r2;
?>
</td>
</tr>
<tr>
<td class="component">
Media Analyzer
</td>
<td class="description">
<?php echo _("LibreTime media analyzer service") ?>
</td>
<td class="solution <?php if ($analyzer) {
echo 'check'; ?>">
<?php if ($systemd) { ?>
<tr>
<td class="component">
Media Analyzer
</td>
<td class="description">
<?php echo _("LibreTime media analyzer service") ?>
</td>
<td class="solution <?php if ($analyzer) {
echo 'check'; ?>">
<?php
} else {
?>">
<?php echo _("Check that the libretime-analyzer service is installed correctly in ") ?><code>/etc/systemd/system/</code>,
<?php echo _(" and ensure that it's running with ") ?>
<br /><code>systemctl status libretime-analyzer</code><br />
<?php echo _("If not, try ") ?><br /><code>sudo systemctl restart libretime-analyzer</code>
<?php
} else {
?>">
<?php echo _("Check that the libretime-analyzer service is installed correctly in ") ?><code>/etc/systemd/system/</code>,
<?php echo _(" and ensure that it's running with ") ?>
<br /><code>systemctl status libretime-analyzer</code><br />
<?php echo _("If not, try ") ?><br /><code>sudo systemctl restart libretime-analyzer</code>
<?php
}
?>
</td>
</tr>
<tr>
<td class="component">
Pypo
</td>
<td class="description">
<?php echo _("LibreTime playout service") ?>
</td>
<td class="solution <?php if ($pypo) {
echo 'check'; ?>">
}
?>
</td>
</tr>
<tr>
<td class="component">
Pypo
</td>
<td class="description">
<?php echo _("LibreTime playout service") ?>
</td>
<td class="solution <?php if ($pypo) {
echo 'check'; ?>">
<?php
} else {
?>">
<?php echo _("Check that the libretime-playout service is installed correctly in ") ?><code>/etc/systemd/system/</code>,
<?php echo _(" and ensure that it's running with ") ?>
<br /><code>systemctl status libretime-playout</code><br />
<?php echo _("If not, try ") ?><br /><code>sudo systemctl restart libretime-playout</code>
<?php
} else {
?>">
<?php echo _("Check that the libretime-playout service is installed correctly in ") ?><code>/etc/systemd/system/</code>,
<?php echo _(" and ensure that it's running with ") ?>
<br /><code>systemctl status libretime-playout</code><br />
<?php echo _("If not, try ") ?><br /><code>sudo systemctl restart libretime-playout</code>
<?php
}
?>
</td>
</tr>
<tr>
<td class="component">
Liquidsoap
</td>
<td class="description">
<?php echo _("LibreTime liquidsoap service") ?>
</td>
<td class="solution <?php if ($liquidsoap) {
echo 'check'; ?>">
}
?>
</td>
</tr>
<tr>
<td class="component">
Liquidsoap
</td>
<td class="description">
<?php echo _("LibreTime liquidsoap service") ?>
</td>
<td class="solution <?php if ($liquidsoap) {
echo 'check'; ?>">
<?php
} else {
?>">
<?php echo _("Check that the libretime-liquidsoap service is installed correctly in ") ?><code>/etc/systemd/system/</code>,
<?php echo _(" and ensure that it's running with ") ?>
<br /><code>systemctl status libretime-liquidsoap</code><br />
<?php echo _("If not, try ") ?><br /><code>sudo systemctl restart libretime-liquidsoap</code>
<?php
} else {
?>">
<?php echo _("Check that the libretime-liquidsoap service is installed correctly in ") ?><code>/etc/systemd/system/</code>,
<?php echo _(" and ensure that it's running with ") ?>
<br /><code>systemctl status libretime-liquidsoap</code><br />
<?php echo _("If not, try ") ?><br /><code>sudo systemctl restart libretime-liquidsoap</code>
<?php
}
?>
</td>
</tr>
<tr>
<td class="component">
Celery
</td>
<td class="description">
<?php echo _("LibreTime Celery Task service") ?>
</td>
<td class="solution <?php if ($celery) {
echo 'check'; ?>">
}
?>
</td>
</tr>
<tr>
<td class="component">
Celery
</td>
<td class="description">
<?php echo _("LibreTime Celery Task service") ?>
</td>
<td class="solution <?php if ($celery) {
echo 'check'; ?>">
<?php
} else {
?>">
<?php echo _("Check that the libretime-worker service is installed correctly in ") ?><code>/etc/systemd/system/</code>,
<?php echo _(" and ensure that it's running with ") ?>
<br /><code>systemctl status libretime-worker</code><br />
<?php echo _("If not, try ") ?><br /><code>sudo systemctl restart libretime-worker</code>
<?php
} else {
?>">
<?php echo _("Check that the libretime-worker service is installed correctly in ") ?><code>/etc/systemd/system/</code>,
<?php echo _(" and ensure that it's running with ") ?>
<br /><code>systemctl status libretime-worker</code><br />
<?php echo _("If not, try ") ?><br /><code>sudo systemctl restart libretime-worker</code>
<?php
}
?>
</td>
</tr>
<tr>
<td class="component">
API
</td>
<td class="description">
<?php echo _("LibreTime API service") ?>
</td>
<td class="solution <?php if ($api) {
echo 'check'; ?>">
}
?>
</td>
</tr>
<tr>
<td class="component">
API
</td>
<td class="description">
<?php echo _("LibreTime API service") ?>
</td>
<td class="solution <?php if ($api) {
echo 'check'; ?>">
<?php
} else {
?>">
<?php echo _("Check that the libretime-api service is installed correctly in ") ?><code>/etc/systemd/system/</code>,
<?php echo _(" and ensure that it's running with ") ?>
<br /><code>systemctl status libretime-api</code><br />
<?php echo _("If not, try ") ?><br /><code>sudo systemctl restart libretime-api</code>
<?php
} else {
?>">
<?php echo _("Check that the libretime-api service is installed correctly in ") ?><code>/etc/systemd/system/</code>,
<?php echo _(" and ensure that it's running with ") ?>
<br /><code>systemctl status libretime-api</code><br />
<?php echo _("If not, try ") ?><br /><code>sudo systemctl restart libretime-api</code>
<?php
}
?>
</td>
</tr>
}
?>
</td>
</tr>
<?php } ?>
</tbody>
<tr id="partitions" class="even">
<th colspan="5"><?php echo _("Disk Space") ?></th>