#!/usr/bin/env bash
set -euo pipefail

# Stoppt den lokalen LLM-Server (llama.cpp) des Voice-Assistants.
# Container-Name ueber ENV ueberschreibbar: CONTAINER_NAME=... ./stop-llm-server.sh

CONTAINER_NAME="${CONTAINER_NAME:-va_llm}"

if docker ps -a --format '{{.Names}}' | grep -q "^${CONTAINER_NAME}\$"; then
  docker rm -f "$CONTAINER_NAME" >/dev/null
  echo "[*] Gestoppt: $CONTAINER_NAME"
else
  echo "[-] Nicht gefunden: $CONTAINER_NAME"
fi
