From 8bf3b1b6523113b9e7d53cb134cc02c51fe415e7 Mon Sep 17 00:00:00 2001 From: robbt Date: Fri, 17 Apr 2020 21:54:26 -0400 Subject: [PATCH] Simplified check to work under Debian using the fact that a pid is greater than 0 --- airtime_mvc/build/airtime-setup/load.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/airtime_mvc/build/airtime-setup/load.php b/airtime_mvc/build/airtime-setup/load.php index d926cbb25..985d6f8d6 100644 --- a/airtime_mvc/build/airtime-setup/load.php +++ b/airtime_mvc/build/airtime-setup/load.php @@ -114,7 +114,7 @@ function checkRMQConnection() { */ function checkAnalyzerService() { exec("pgrep -f -u www-data airtime_analyzer", $out, $status); - if (array_key_exists(0, $out) && $status == 0) { + if (($out > 0) && $status == 0) { return posix_kill(rtrim($out[0]), 0); } return $status == 0; @@ -127,7 +127,7 @@ function checkAnalyzerService() { */ function checkPlayoutService() { exec("pgrep -f -u www-data airtime-playout", $out, $status); - if (array_key_exists(0, $out) && $status == 0) { + if ($out > 0) { return posix_kill(rtrim($out[0]), 0); } return $status == 0; @@ -140,7 +140,7 @@ function checkPlayoutService() { */ function checkLiquidsoapService() { exec("pgrep -f -u www-data airtime-liquidsoap", $out, $status); - if (array_key_exists(0, $out) && $status == 0) { + if ($out > 0) { return posix_kill(rtrim($out[0]), 0); } return $status == 0;