Merge pull request #997 from Robbt/fix-status-page
Simplified status page check to work under Debian
This commit is contained in:
commit
6df9e51981
|
@ -113,8 +113,8 @@ function checkRMQConnection() {
|
|||
* @return boolean true if airtime-analyzer is running
|
||||
*/
|
||||
function checkAnalyzerService() {
|
||||
exec("pgrep -f -u www-data airtime_analyzer", $out, $status);
|
||||
if (array_key_exists(0, $out) && $status == 0) {
|
||||
exec("pgrep -f airtime_analyzer", $out, $status);
|
||||
if (($out > 0) && $status == 0) {
|
||||
return posix_kill(rtrim($out[0]), 0);
|
||||
}
|
||||
return $status == 0;
|
||||
|
@ -126,8 +126,8 @@ function checkAnalyzerService() {
|
|||
* @return boolean true if airtime-playout is running
|
||||
*/
|
||||
function checkPlayoutService() {
|
||||
exec("pgrep -f -u www-data airtime-playout", $out, $status);
|
||||
if (array_key_exists(0, $out) && $status == 0) {
|
||||
exec("pgrep -f airtime-playout", $out, $status);
|
||||
if ($out > 0) {
|
||||
return posix_kill(rtrim($out[0]), 0);
|
||||
}
|
||||
return $status == 0;
|
||||
|
@ -139,8 +139,8 @@ function checkPlayoutService() {
|
|||
* @return boolean true if airtime-liquidsoap is running
|
||||
*/
|
||||
function checkLiquidsoapService() {
|
||||
exec("pgrep -f -u www-data airtime-liquidsoap", $out, $status);
|
||||
if (array_key_exists(0, $out) && $status == 0) {
|
||||
exec("pgrep -f airtime-liquidsoap", $out, $status);
|
||||
if ($out > 0) {
|
||||
return posix_kill(rtrim($out[0]), 0);
|
||||
}
|
||||
return $status == 0;
|
||||
|
|
Loading…
Reference in New Issue