fix(cluster): update Asterisk CLI health check command to core show uptime
This commit is contained in:
1 parent
b76490a4dc
commit
940ff800ad
3 files changed
+8
-8
No files matched your search
@@ -239,10 +239,10 @@ class ClusterManager
|
||||
$asteriskRunning = trim((string)shell_exec('pidof asterisk 2>/dev/null')) !== '';
|
||||
$asteriskPing = false;
|
||||
if ($asteriskRunning) {
|
||||
$pingOut = shell_exec("asterisk -rx 'core ping' 2>/dev/null")
|
||||
?: shell_exec("sudo -n /usr/sbin/asterisk -rx 'core ping' 2>/dev/null")
|
||||
?: '';
|
||||
$asteriskPing = str_contains($pingOut, 'Pong');
|
||||
$cliOut = shell_exec("sudo -n /usr/sbin/asterisk -rx 'core show uptime' 2>/dev/null")
|
||||
?: shell_exec("/usr/sbin/asterisk -rx 'core show uptime' 2>/dev/null")
|
||||
?: '';
|
||||
$asteriskPing = str_contains($cliOut, 'uptime') || str_contains($cliOut, 'System');
|
||||
}
|
||||
|
||||
// 3. Test de connectivité vers le nœud pair (Peer Ping)
|
||||
|
||||
Reference in new issue
Block a user