add API v2

This commit is contained in:
Kyle Robbertze 2020-01-30 15:47:36 +02:00
parent f809c3a8ff
commit 2df0189a90
71 changed files with 2740 additions and 315 deletions

View file

@ -7,10 +7,11 @@
<p>
Looks like you're almost done! As a final step, please run the following commands from the terminal:
</p>
<pre style="text-align: left">sudo systemctl start libretime-playout
<pre style="text-align: left">sudo systemctl start libretime-analyzer
sudo systemctl start libretime-api
sudo systemctl start libretime-celery
sudo systemctl start libretime-liquidsoap
sudo systemctl start libretime-analyzer
sudo systemctl start libretime-celery</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!

View file

@ -56,6 +56,7 @@ function checkExternalServices() {
"liquidsoap" => checkLiquidsoapService(),
"rabbitmq" => checkRMQConnection(),
"celery" => checkCeleryService(),
"api" => checkApiService(),
);
}
@ -158,3 +159,16 @@ function checkCeleryService() {
}
return $status == 0;
}
/**
* Check if libretime-api is currently running
*
* @return boolean true if libretime-api is running
*/
function checkApiService() {
exec("pgrep -f -u www-data uwsgi", $out, $status);
if (array_key_exists(0, $out) && $status == 0) {
return 1;
}
return $status == 0;
}