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
@@ -10,9 +10,9 @@ if ! pidof asterisk >/dev/null 2>&1; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# 2. Teste si Asterisk répond aux requêtes CLI (core ping)
|
||||
PING_RESP=$(/usr/sbin/asterisk -rx "core ping" 2>/dev/null || true)
|
||||
if echo "$PING_RESP" | grep -q "Pong"; then
|
||||
# 2. Teste si Asterisk répond aux requêtes CLI (core show uptime)
|
||||
RESP=$(/usr/sbin/asterisk -rx "core show uptime" 2>/dev/null || true)
|
||||
if echo "$RESP" | grep -qi "uptime"; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
||||
Reference in new issue
Block a user