#!/usr/bin/env bash # # Linux Zero — Installer für Zorin OS # Deine souveräne KI-Station mit Kato als Haupt-Agent. Läuft komplett auf deinem Rechner. # # Installation (eine Zeile, als normaler Benutzer): # curl -sL https://poised-mayfly.pikapod.net/cemsadmin/linux-zero/raw/branch/main/install.sh | bash # set -euo pipefail REPO_URL="${LX0_REPO_URL:-https://poised-mayfly.pikapod.net/cemsadmin/linux-zero.git}" INSTALL_DIR="${LX0_DIR:-$HOME/.linux-zero}" LOG_FILE="$HOME/linux-zero-install.log" log() { printf '\033[1;33m[LX0]\033[0m %s\n' "$*" | tee -a "$LOG_FILE"; } fail() { printf '\033[1;31m[FEHLER]\033[0m %s\n' "$*" | tee -a "$LOG_FILE"; exit 1; } [ "$(id -u)" -eq 0 ] && fail "Bitte nicht als root starten — das Script nutzt sudo selbst, wo nötig." # --- Bootstrap: bei `curl | bash` liegt noch kein Repo vor → erst klonen, dann von dort weiterlaufen SCRIPT_SOURCE="${BASH_SOURCE[0]:-}" SCRIPT_DIR="" if [ -n "$SCRIPT_SOURCE" ]; then SCRIPT_DIR="$(cd "$(dirname "$SCRIPT_SOURCE")" && pwd)" fi if [ -z "$SCRIPT_DIR" ] || [ ! -f "$SCRIPT_DIR/scripts/preflight.sh" ]; then log "Hole Linux Zero nach $INSTALL_DIR ..." if ! command -v git >/dev/null 2>&1; then sudo apt-get update -qq sudo apt-get install -y git fi if [ -d "$INSTALL_DIR/.git" ]; then git -C "$INSTALL_DIR" pull --ff-only else git clone --depth 1 "$REPO_URL" "$INSTALL_DIR" fi exec bash "$INSTALL_DIR/install.sh" fi cd "$SCRIPT_DIR" log "Starte Installation aus $SCRIPT_DIR (Protokoll: $LOG_FILE)" [ -f .env ] || cp .env.example .env bash scripts/preflight.sh bash scripts/install-docker.sh log "Starte die AGI-Station (Docker Compose) ..." sudo docker compose up -d bash scripts/setup-agents.sh bash scripts/apply-theme.sh bash scripts/create-shortcuts.sh # shellcheck disable=SC1091 . ./.env log "──────────────────────────────────────────────" log "Linux Zero steht. Kato erwartet dich." log "" log " AGI-Station (Chat): http://localhost:${WEBUI_PORT:-3000}" log " Werkstatt (n8n): http://localhost:${N8N_PORT:-5678}" log "" log "Haupt-Agent: kato — weitere Berater: seneca, cicero, marcus" log "Wechseln: bash scripts/set-main-agent.sh " log "Auf dem Schreibtisch liegen Verknüpfungen bereit." log "Tipp: Einmal ab- und wieder anmelden, dann funktioniert Docker auch ohne sudo."