From 88fd24c22b251fef7f7faeeccda2b3f938436af1 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 21 Oct 2026 15:14:25 +0200 Subject: [PATCH] =?UTF-8?q?install.sh:=20Voraussetzungen=20pr=C3=BCfen=20(?= =?UTF-8?q?root,=20apt,=20systemd,=20RAM)=20und=20vollst=C3=A4ndig=20insta?= =?UTF-8?q?llieren?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01X48pE4bzjHej8w9HyZXCjb --- deploy/install.sh | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/deploy/install.sh b/deploy/install.sh index c37c1b0..2ba62e3 100644 --- a/deploy/install.sh +++ b/deploy/install.sh @@ -9,9 +9,17 @@ DATA=/var/lib/trainpulse SRC=$(cd "$(dirname "$0")/.." && pwd) BBOX=5.8,45.7,10.6,47.9 # Schweiz mit etwas Rand -echo "==> Pakete" +[ "$(id -u)" = 0 ] || { echo "Bitte als root ausführen" >&2; exit 1; } +command -v apt-get >/dev/null || { echo "Nur für Debian/Ubuntu (apt) gedacht" >&2; exit 1; } +command -v systemctl >/dev/null || { echo "systemd fehlt – im Proxmox-LXC mit Debian-Template ist es dabei" >&2; exit 1; } +mem=$(awk '/MemTotal/ {print int($2/1024)}' /proc/meminfo) +[ "$mem" -ge 3500 ] || echo "WARNUNG: nur ${mem} MB RAM – für die Fahrplan-Aufbereitung werden ~4 GB empfohlen" >&2 + +echo "==> Pakete (Python, Compiler und Bibliotheken für pfaedle, Werkzeuge)" +export DEBIAN_FRONTEND=noninteractive apt-get update -qq -apt-get install -y -qq python3-venv git cmake g++ make libzip-dev zlib1g-dev libbz2-dev curl ca-certificates >/dev/null +apt-get install -y -qq python3 python3-venv python3-pip git cmake g++ make \ + libzip-dev zlib1g-dev libbz2-dev curl ca-certificates tar >/dev/null echo "==> Programm nach $APP" id trainpulse &>/dev/null || useradd --system --home-dir "$DATA" --shell /usr/sbin/nologin trainpulse