docs(systemd): fix paths + add dashboard smoke + vendor units
This commit is contained in:
20
scripts/smoke_dashboard.sh
Executable file
20
scripts/smoke_dashboard.sh
Executable file
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
HOST="${SECOND_BRAIN_HOST:-127.0.0.1}"
|
||||
PORT="${SECOND_BRAIN_PORT:-${PORT:-8501}}"
|
||||
BASE_URL="http://${HOST}:${PORT}"
|
||||
|
||||
if command -v systemctl >/dev/null 2>&1; then
|
||||
if ! systemctl is-active --quiet openclaw-secondbrain-dashboard.service; then
|
||||
echo "ERROR: openclaw-secondbrain-dashboard.service is not active" >&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
curl -fsS "${BASE_URL}/healthz" >/dev/null
|
||||
|
||||
stats_json="$(curl -fsS "${BASE_URL}/api/stats")"
|
||||
python3 -c 'import json,sys; json.load(sys.stdin)' <<<"$stats_json"
|
||||
|
||||
echo "OK: dashboard smoke test passed (${BASE_URL})"
|
||||
Reference in New Issue
Block a user