mirror of
https://github.com/MrSleeps/jellyfin-scene-search.git
synced 2026-11-17 07:21:28 +00:00
36 lines
1002 B
Bash
Executable File
36 lines
1002 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -Eeuo pipefail
|
|
source "$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)/common.sh"
|
|
|
|
need docker
|
|
|
|
banner "Docker"
|
|
compose ps || true
|
|
|
|
banner "Jellyfin"
|
|
if command -v systemctl >/dev/null 2>&1; then
|
|
systemctl is-active jellyfin || true
|
|
else
|
|
printf 'systemctl unavailable\n'
|
|
fi
|
|
|
|
banner "Scene Search health"
|
|
port="${SCENE_API_PORT:-8097}"
|
|
if command -v curl >/dev/null 2>&1; then
|
|
health="$(curl -fsS "http://127.0.0.1:${port}/api/health" 2>/dev/null || true)"
|
|
if [[ -n "$health" ]]; then
|
|
if command -v python3 >/dev/null 2>&1; then
|
|
printf '%s' "$health" | python3 -m json.tool || printf '%s\n' "$health"
|
|
else
|
|
printf '%s\n' "$health"
|
|
fi
|
|
else
|
|
printf 'Scene Search health endpoint unavailable on port %s.\n' "$port"
|
|
fi
|
|
fi
|
|
|
|
if command -v nvidia-smi >/dev/null 2>&1; then
|
|
banner "GPU"
|
|
nvidia-smi --query-gpu=name,memory.used,memory.total,utilization.gpu --format=csv,noheader || true
|
|
fi
|