linux-zero/scripts/preflight.sh
Cem Varli dcd4fce8eb [agent:opencode][session:2026-06-19-rebrand]
Rebrand Roman Station -> Linux Zero abgeschlossen:
- scripts/preflight.sh (Kommentar)
- agents/modelfiles/{Seneca,Cicero,Marcus}.Modelfile (System-Prompt)
Keine Roman-Station-Strings mehr im Repo.
2026-06-19 19:48:37 +02:00

35 lines
1.4 KiB
Bash
Executable file
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/usr/bin/env bash
# Prüft, ob der Rechner für Linux Zero geeignet ist.
set -euo pipefail
warn() { printf '\033[1;33m[HINWEIS]\033[0m %s\n' "$*"; }
fail() { printf '\033[1;31m[FEHLER]\033[0m %s\n' "$*"; exit 1; }
# Zorin OS?
# shellcheck disable=SC1091
. /etc/os-release
if [ "${ID:-}" != "zorin" ]; then
if [ "${LX0_SKIP_OS_CHECK:-0}" = "1" ]; then
warn "Kein Zorin OS erkannt (${PRETTY_NAME:-unbekannt}) — Prüfung per LX0_SKIP_OS_CHECK übersprungen."
else
fail "Dieses Script ist für Zorin OS gebaut (gefunden: ${PRETTY_NAME:-unbekannt}). Erzwingen mit: LX0_SKIP_OS_CHECK=1"
fi
fi
# Arbeitsspeicher
ram_gb="$(awk '/MemTotal/ {printf "%d", $2/1024/1024}' /proc/meminfo)"
[ "$ram_gb" -ge 8 ] || fail "Mindestens 8 GB RAM nötig, gefunden: ${ram_gb} GB."
[ "$ram_gb" -ge 16 ] || warn "Nur ${ram_gb} GB RAM — die Station läuft, aber bleib bei kleinen Modellen (34B)."
# Freier Speicherplatz
free_gb="$(df -BG --output=avail "$HOME" | tail -1 | tr -dc '0-9')"
[ "$free_gb" -ge 25 ] || fail "Mindestens 25 GB freier Speicher nötig, gefunden: ${free_gb} GB."
# Internet
curl -fsS --max-time 10 https://hub.docker.com >/dev/null 2>&1 \
|| fail "Keine Internetverbindung — wird für den Download der Container gebraucht."
# sudo-Rechte
sudo -v || fail "sudo-Rechte werden für die Installation benötigt."
printf '\033[1;32m[OK]\033[0m Systemprüfung bestanden (%s GB RAM, %s GB frei).\n' "$ram_gb" "$free_gb"