#!/usr/bin/env bash set -euo pipefail if [[ $EUID -ne 0 ]]; then echo "Dieses Skript muss als root ausgeführt werden." >&2 exit 1 fi REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" PLATFORM="$REPO_ROOT/platform" PROFILE_TARGET=/opt/mike-ai/platform/profiles DROPIN=/etc/systemd/system/mike-ai-llama-ui.service.d WEB_TARGET=/opt/mike-ai/web-search install -d -m 0755 "$PROFILE_TARGET" "$DROPIN" "$WEB_TARGET" /etc/mike-ai install -m 0644 "$PLATFORM/systemd/mike-ai-llama-ui.service" \ /etc/systemd/system/mike-ai-llama-ui.service install -m 0644 "$PLATFORM/systemd/mike-ai-web-search.service" \ /etc/systemd/system/mike-ai-web-search.service install -m 0755 "$PLATFORM/scripts/llama-profile" /usr/local/bin/llama-profile install -m 0644 "$PLATFORM/profiles/profile-fast.conf" "$PROFILE_TARGET/profile-fast.conf" install -m 0644 "$PLATFORM/profiles/profile-medium.conf" "$PROFILE_TARGET/profile-medium.conf" install -m 0644 "$PLATFORM/profiles/profile-long.conf" "$PROFILE_TARGET/profile-long.conf" install -m 0644 "$PLATFORM/web-search/compose.yaml" "$WEB_TARGET/compose.yaml" install -m 0644 "$PLATFORM/web-search/tinysearch_config.json" \ "$WEB_TARGET/tinysearch_config.json" install -m 0755 "$PLATFORM/web-search/web_search_mcp.py" \ "$WEB_TARGET/web_search_mcp.py" if [[ ! -e "$WEB_TARGET/searxng-settings.yml" ]]; then install -m 0600 "$PLATFORM/web-search/searxng-settings.example.yml" \ "$WEB_TARGET/searxng-settings.yml.example" fi if [[ ! -e /etc/mike-ai/mcp-servers.json ]]; then install -m 0600 "$PLATFORM/mcp/mcp-servers.example.json" \ /etc/mike-ai/mcp-servers.json.example fi systemctl daemon-reload cat <<'EOF' Kernkonfiguration installiert, aber noch nicht gestartet. Vor dem Start: 1. Modellpfade und Hashes gegen manifest.local.yaml prüfen. 2. /etc/mike-ai/mcp-servers.json mit minimalen Servern erstellen. 3. llama.cpp bauen. 4. Danach: llama-profile fast EOF