workbuddy.xpcool.com/.workbuddy/tmp/test-bark.sh

23 lines
800 B
Bash
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/bash
# Bark 通道自检2026-09-13验证 key 是否可用
KEY="41c8059de37b3f1e826be240c72318e947366a283e125fb2784f3c1aa532b8cd"
echo "=== bark healthz ==="
curl -s -o /dev/null -m 10 -w "healthz=%{http_code}\n" http://127.0.0.1:8081/healthz
echo ""
echo "=== key1 (user provided, len=${#KEY}) ==="
curl -s -m 20 -o /tmp/bark-key1.json -w "http=%{http_code}\n" \
"http://127.0.0.1:8081/$KEY/Kuma%20Channel%20Test/ai-verify-20260913"
echo "--- body ---"
cat /tmp/bark-key1.json 2>/dev/null
echo ""
echo ""
echo "=== key2 (existing server-monitor key) ==="
curl -s -m 20 -o /tmp/bark-key2.json -w "http=%{http_code}\n" \
"http://127.0.0.1:8081/sm5WnyANWx89GgLtFnRXhk/Kuma%20Channel%20Test/server-monitor-key-check"
echo "--- body ---"
cat /tmp/bark-key2.json 2>/dev/null
echo ""