📚 Improved backend structure & logs, added conflict manager 🌟

This commit is contained in:
2025-06-02 14:26:33 +02:00
parent f2928b97fc
commit 3cab66efc8
10 changed files with 773 additions and 5 deletions

View File

@@ -117,17 +117,23 @@ check_system_resources() {
local ram_mb=$(free -m | awk '/^Mem:/{print $2}')
progress "Verfügbarer RAM: ${ram_mb}MB"
if [ "$ram_mb" -lt 512 ]; then
if [ -n "$ram_mb" ] && [ "$ram_mb" -eq "$ram_mb" ] 2>/dev/null && [ "$ram_mb" -lt 512 ]; then
warning "⚠️ Wenig RAM verfügbar (${ram_mb}MB) - Installation könnte langsam sein"
else
elif [ -n "$ram_mb" ] && [ "$ram_mb" -eq "$ram_mb" ] 2>/dev/null; then
success "✅ Ausreichend RAM verfügbar (${ram_mb}MB)"
else
warning "⚠️ RAM-Größe konnte nicht ermittelt werden"
fi
# Festplattenplatz prüfen
local disk_free_gb=$(df / | awk 'NR==2{printf "%.1f", $4/1024/1024}')
progress "Verfügbarer Festplattenplatz: ${disk_free_gb}GB"
if [ "$(echo "$disk_free_gb < 2.0" | bc 2>/dev/null || echo "0")" -eq 1 ]; then
# Konvertiere zu Ganzzahl für Vergleich (GB * 10 für eine Dezimalstelle)
local disk_free_int=$(echo "$disk_free_gb * 10" | bc 2>/dev/null | cut -d. -f1)
local min_required_int=20 # 2.0 GB * 10
if [ -z "$disk_free_int" ] || [ "$disk_free_int" -lt "$min_required_int" ]; then
warning "⚠️ Wenig Festplattenplatz verfügbar (${disk_free_gb}GB)"
else
success "✅ Ausreichend Festplattenplatz verfügbar (${disk_free_gb}GB)"