mirror of
git://f0xx.org/ac/ac-deploy
synced 2026-08-12 18:12:19 +03:00
29 lines
618 B
Bash
Executable File
29 lines
618 B
Bash
Executable File
#!/bin/sh
|
|
# SFU lab smoke: Janus HTTP + signaling health (run on app node or dev).
|
|
set -eu
|
|
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
|
# shellcheck source=/dev/null
|
|
. "$ROOT/scripts/lib/common.sh"
|
|
load_cluster_env 2>/dev/null || true
|
|
|
|
ORIGIN="${LAB_PUBLIC_ORIGIN:-https://apps.f0xx.org}"
|
|
JANUS="${CAST02_IP:-10.7.16.237}"
|
|
FAIL=0
|
|
|
|
check() {
|
|
if "$@"; then
|
|
log "OK: $*"
|
|
else
|
|
log "FAIL: $*"
|
|
FAIL=1
|
|
fi
|
|
}
|
|
|
|
check curl -sf "http://${JANUS}:8088/janus/info" | grep -q janus
|
|
check curl -sf "${ORIGIN}/app/androidcast_project/sfu/health" | grep -q '"ok"'
|
|
|
|
if [ "$FAIL" -ne 0 ]; then
|
|
exit 1
|
|
fi
|
|
log "smoke_sfu_ok"
|