install.sh: Voraussetzungen prüfen (root, apt, systemd, RAM) und vollständig installieren
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01X48pE4bzjHej8w9HyZXCjb
This commit is contained in:
+10
-2
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user