🎉 Improved IHK Project Documentation and Logs for smoother installation process 📚💄
This commit is contained in:
parent
690aa8835e
commit
19951ba6e4
@ -1,32 +1,32 @@
|
|||||||
=================================================================
|
=================================================================
|
||||||
MYP Installation DEBUG Log - 2025-06-03 21:26:54
|
MYP Installation DEBUG Log - 2025-06-03 21:34:03
|
||||||
=================================================================
|
=================================================================
|
||||||
|
|
||||||
[2025-06-03 21:26:54] DEBUG von setup.sh:485
|
[2025-06-03 21:34:03] DEBUG von setup.sh:485
|
||||||
Debian erkannt über /etc/debian_version: 12.11
|
Debian erkannt über /etc/debian_version: 12.11
|
||||||
---
|
---
|
||||||
|
|
||||||
[2025-06-03 21:26:54] DEBUG von setup.sh:553
|
[2025-06-03 21:34:03] DEBUG von setup.sh:553
|
||||||
Kein Raspberry Pi erkannt. Hardware-Info:
|
Kein Raspberry Pi erkannt. Hardware-Info:
|
||||||
---
|
---
|
||||||
|
|
||||||
[2025-06-03 21:26:54] DEBUG von setup.sh:554
|
[2025-06-03 21:34:03] DEBUG von setup.sh:554
|
||||||
- Device Tree: nicht verfügbar
|
- Device Tree: nicht verfügbar
|
||||||
---
|
---
|
||||||
|
|
||||||
[2025-06-03 21:26:54] DEBUG von setup.sh:555
|
[2025-06-03 21:34:03] DEBUG von setup.sh:555
|
||||||
- CPU Hardware: nicht verfügbar
|
- CPU Hardware: nicht verfügbar
|
||||||
---
|
---
|
||||||
|
|
||||||
[2025-06-03 21:26:54] DEBUG von setup.sh:595
|
[2025-06-03 21:34:03] DEBUG von setup.sh:595
|
||||||
Vollständige Kernel-Info: Linux raspberrypi 6.1.0-37-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.140-1 (2025-05-22) x86_64 GNU/Linux
|
Vollständige Kernel-Info: Linux raspberrypi 6.1.0-37-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.140-1 (2025-05-22) x86_64 GNU/Linux
|
||||||
---
|
---
|
||||||
|
|
||||||
[2025-06-03 21:26:56] DEBUG von setup.sh:651
|
[2025-06-03 21:34:03] DEBUG von setup.sh:651
|
||||||
DNS-Test Details: Teste DNS für 8.8.8.8: Erfolg mit nslookup.
|
DNS-Test Details: Teste DNS für 8.8.8.8: Erfolg mit nslookup.
|
||||||
---
|
---
|
||||||
|
|
||||||
[2025-06-03 21:26:56] DEBUG von setup.sh:752
|
[2025-06-03 21:34:04] DEBUG von setup.sh:752
|
||||||
Externe IP ermittelt über ifconfig.me: 163.116.179.142
|
Externe IP ermittelt über ifconfig.me: 163.116.179.142
|
||||||
---
|
---
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
=================================================================
|
=================================================================
|
||||||
MYP Installation FEHLER Log - 2025-06-03 21:26:54
|
MYP Installation FEHLER Log - 2025-06-03 21:34:03
|
||||||
=================================================================
|
=================================================================
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
=================================================================
|
=================================================================
|
||||||
MYP Installation WARNUNGEN Log - 2025-06-03 21:26:54
|
MYP Installation WARNUNGEN Log - 2025-06-03 21:34:03
|
||||||
=================================================================
|
=================================================================
|
||||||
|
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
=================================================================
|
=================================================================
|
||||||
MYP Installation Log - 2025-06-03 21:26:54
|
MYP Installation Log - 2025-06-03 21:34:03
|
||||||
Script Version: 4.1.0
|
Script Version: 4.1.0
|
||||||
System: Linux raspberrypi 6.1.0-37-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.140-1 (2025-05-22) x86_64 GNU/Linux
|
System: Linux raspberrypi 6.1.0-37-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.140-1 (2025-05-22) x86_64 GNU/Linux
|
||||||
=================================================================
|
=================================================================
|
||||||
|
|
||||||
[0;32m[2025-06-03 21:26:54] === MODUS: ROBUSTE ABHÄNGIGKEITEN-INSTALLATION FÜR MANUELLES TESTEN ===[0m
|
[0;32m[2025-06-03 21:34:03] === MODUS: ROBUSTE ABHÄNGIGKEITEN-INSTALLATION FÜR MANUELLES TESTEN ===[0m
|
||||||
[0;32m[2025-06-03 21:26:54] ✅ Root-Berechtigung bestätigt[0m
|
[0;32m[2025-06-03 21:34:03] ✅ Root-Berechtigung bestätigt[0m
|
||||||
[0;32m[2025-06-03 21:26:54] === SYSTEM-RESSOURCEN PRÜFUNG ===[0m
|
[0;32m[2025-06-03 21:34:03] === SYSTEM-RESSOURCEN PRÜFUNG ===[0m
|
||||||
[0;35m[FORTSCHRITT] Prüfe RAM...[0m
|
[0;35m[FORTSCHRITT] Prüfe RAM...[0m
|
||||||
[0;35m[FORTSCHRITT] Verfügbarer RAM: 15614MB[0m
|
[0;35m[FORTSCHRITT] Verfügbarer RAM: 15614MB[0m
|
||||||
[0;36m[ERFOLG] ✅ Ausreichend RAM verfügbar (15614MB)[0m
|
[0;36m[ERFOLG] ✅ Ausreichend RAM verfügbar (15614MB)[0m
|
||||||
@ -16,10 +16,10 @@ System: Linux raspberrypi 6.1.0-37-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.140-1
|
|||||||
[0;35m[FORTSCHRITT] Prüfe CPU...[0m
|
[0;35m[FORTSCHRITT] Prüfe CPU...[0m
|
||||||
[0;35m[FORTSCHRITT] CPU: 6 Kern(e) - 11th Gen Intel(R) Core(TM) i7-11850H @ 2.50GHz[0m
|
[0;35m[FORTSCHRITT] CPU: 6 Kern(e) - 11th Gen Intel(R) Core(TM) i7-11850H @ 2.50GHz[0m
|
||||||
[0;36m[ERFOLG] ✅ CPU-Information erfolgreich ermittelt[0m
|
[0;36m[ERFOLG] ✅ CPU-Information erfolgreich ermittelt[0m
|
||||||
[0;32m[2025-06-03 21:26:54] ✅ System-Ressourcen-Prüfung abgeschlossen[0m
|
[0;32m[2025-06-03 21:34:03] ✅ System-Ressourcen-Prüfung abgeschlossen[0m
|
||||||
[0;35m[FORTSCHRITT] Prüfe Debian/Raspbian-System...[0m
|
[0;35m[FORTSCHRITT] Prüfe Debian/Raspbian-System...[0m
|
||||||
[0;34m[DEBUG] Debian erkannt über /etc/debian_version: 12.11[0m
|
[0;34m[DEBUG] Debian erkannt über /etc/debian_version: 12.11[0m
|
||||||
[0;32m[2025-06-03 21:26:54] ✅ Debian/Raspbian-basiertes System erkannt (Version: 12.11)[0m
|
[0;32m[2025-06-03 21:34:03] ✅ Debian/Raspbian-basiertes System erkannt (Version: 12.11)[0m
|
||||||
[0;35m[FORTSCHRITT] Prüfe Raspberry Pi Hardware...[0m
|
[0;35m[FORTSCHRITT] Prüfe Raspberry Pi Hardware...[0m
|
||||||
[0;34m[INFO] 💻 Standard-PC/Server System (kein Raspberry Pi)[0m
|
[0;34m[INFO] 💻 Standard-PC/Server System (kein Raspberry Pi)[0m
|
||||||
[0;34m[DEBUG] Kein Raspberry Pi erkannt. Hardware-Info:[0m
|
[0;34m[DEBUG] Kein Raspberry Pi erkannt. Hardware-Info:[0m
|
||||||
@ -31,7 +31,7 @@ System: Linux raspberrypi 6.1.0-37-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.140-1
|
|||||||
[0;35m[FORTSCHRITT] Prüfe Kernel-Version...[0m
|
[0;35m[FORTSCHRITT] Prüfe Kernel-Version...[0m
|
||||||
[0;34m[INFO] 🐧 Kernel-Version: 6.1.0-37-amd64[0m
|
[0;34m[INFO] 🐧 Kernel-Version: 6.1.0-37-amd64[0m
|
||||||
[0;34m[DEBUG] Vollständige Kernel-Info: Linux raspberrypi 6.1.0-37-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.140-1 (2025-05-22) x86_64 GNU/Linux[0m
|
[0;34m[DEBUG] Vollständige Kernel-Info: Linux raspberrypi 6.1.0-37-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.140-1 (2025-05-22) x86_64 GNU/Linux[0m
|
||||||
[0;32m[2025-06-03 21:26:54] ✅ System-Analyse abgeschlossen[0m
|
[0;32m[2025-06-03 21:34:03] ✅ System-Analyse abgeschlossen[0m
|
||||||
[0;35m[FORTSCHRITT] Prüfe Internetverbindung (erweiterte Methoden)...[0m
|
[0;35m[FORTSCHRITT] Prüfe Internetverbindung (erweiterte Methoden)...[0m
|
||||||
[0;35m[FORTSCHRITT] Teste DNS-Auflösung...[0m
|
[0;35m[FORTSCHRITT] Teste DNS-Auflösung...[0m
|
||||||
[0;34m[DEBUG] DNS-Test Details: Teste DNS für 8.8.8.8: Erfolg mit nslookup. [0m
|
[0;34m[DEBUG] DNS-Test Details: Teste DNS für 8.8.8.8: Erfolg mit nslookup. [0m
|
||||||
@ -40,5 +40,5 @@ System: Linux raspberrypi 6.1.0-37-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.140-1
|
|||||||
[0;35m[FORTSCHRITT] Ermittle externe IP-Adresse...[0m
|
[0;35m[FORTSCHRITT] Ermittle externe IP-Adresse...[0m
|
||||||
[0;34m[INFO] 🌐 Externe IP: 163.116.179.142[0m
|
[0;34m[INFO] 🌐 Externe IP: 163.116.179.142[0m
|
||||||
[0;34m[DEBUG] Externe IP ermittelt über ifconfig.me: 163.116.179.142[0m
|
[0;34m[DEBUG] Externe IP ermittelt über ifconfig.me: 163.116.179.142[0m
|
||||||
[0;32m[2025-06-03 21:26:56] === KONFIGURIERE HOSTNAME ===[0m
|
[0;32m[2025-06-03 21:34:04] === KONFIGURIERE HOSTNAME ===[0m
|
||||||
[0;32m[2025-06-03 21:26:56] ✅ Hostname bereits korrekt: 'raspberrypi'[0m
|
[0;32m[2025-06-03 21:34:04] ✅ Hostname bereits korrekt: 'raspberrypi'[0m
|
||||||
|
@ -1904,49 +1904,66 @@ EOF
|
|||||||
else
|
else
|
||||||
# Standard-Verhalten für echtes Linux
|
# Standard-Verhalten für echtes Linux
|
||||||
home_dirs=("/root")
|
home_dirs=("/root")
|
||||||
# Füge alle Home-Verzeichnisse hinzu, aber mit Timeout
|
# Füge nur existierende Home-Verzeichnisse hinzu (max 5)
|
||||||
while IFS= read -r -d '' user_home; do
|
local count=0
|
||||||
if [ "$user_home" != "/home/lost+found" ]; then
|
for user_home in /home/*; do
|
||||||
|
if [ -d "$user_home" ] && [ "$user_home" != "/home/lost+found" ]; then
|
||||||
home_dirs+=("$user_home")
|
home_dirs+=("$user_home")
|
||||||
|
((count++))
|
||||||
|
if [ $count -ge 5 ]; then
|
||||||
|
debug "Limitiere auf 5 Home-Verzeichnisse"
|
||||||
|
break
|
||||||
fi
|
fi
|
||||||
done < <(find /home -maxdepth 1 -type d -print0 2>/dev/null | head -20)
|
fi
|
||||||
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Aktualisiere Bash-Profile mit Timeout
|
debug "Aktualisiere Bash-Profile für ${#home_dirs[@]} Verzeichnisse"
|
||||||
|
|
||||||
|
# Aktualisiere Bash-Profile (vereinfacht)
|
||||||
for user_home in "${home_dirs[@]}"; do
|
for user_home in "${home_dirs[@]}"; do
|
||||||
if [ -d "$user_home" ] && [ -w "$user_home" ]; then
|
if [ -d "$user_home" ] && [ -w "$user_home" ]; then
|
||||||
# Prüfe ob .bashrc existiert und lesbar ist
|
local bashrc_file="$user_home/.bashrc"
|
||||||
if [ -f "$user_home/.bashrc" ] && [ -r "$user_home/.bashrc" ]; then
|
|
||||||
# Verwende timeout um hängende Operationen zu vermeiden
|
# Prüfe ob .bashrc existiert
|
||||||
if timeout 5s grep -q "MYP Application Environment" "$user_home/.bashrc" 2>/dev/null; then
|
if [ -f "$bashrc_file" ]; then
|
||||||
debug "Bash-Profile bereits konfiguriert: $user_home/.bashrc"
|
# Prüfe ob bereits konfiguriert (ohne timeout)
|
||||||
|
if grep -q "MYP Application Environment" "$bashrc_file" 2>/dev/null; then
|
||||||
|
debug "Bash-Profile bereits konfiguriert: $bashrc_file"
|
||||||
else
|
else
|
||||||
# Schreibe mit timeout und prüfe Erfolg
|
# Erstelle temporäre Datei mit dem Inhalt
|
||||||
if timeout 5s bash -c "cat >> '$user_home/.bashrc' << 'EOF'
|
local temp_file="/tmp/myp_bashrc_addition_$$"
|
||||||
|
cat > "$temp_file" << 'EOF'
|
||||||
|
|
||||||
# MYP Application Environment
|
# MYP Application Environment
|
||||||
if [ -d \"/opt/myp\" ]; then
|
if [ -d "/opt/myp" ]; then
|
||||||
export MYP_APP_DIR=\"/opt/myp\"
|
export MYP_APP_DIR="/opt/myp"
|
||||||
export FLASK_APP=\"/opt/myp/app.py\"
|
export FLASK_APP="/opt/myp/app.py"
|
||||||
export FLASK_ENV=\"production\"
|
export FLASK_ENV="production"
|
||||||
if [ -z \"\${PYTHONPATH:-}\" ]; then
|
if [ -z "${PYTHONPATH:-}" ]; then
|
||||||
export PYTHONPATH=\"/opt/myp\"
|
export PYTHONPATH="/opt/myp"
|
||||||
else
|
else
|
||||||
export PYTHONPATH=\"/opt/myp:\$PYTHONPATH\"
|
export PYTHONPATH="/opt/myp:$PYTHONPATH"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
EOF" 2>/dev/null; then
|
EOF
|
||||||
|
|
||||||
|
# Füge Inhalt hinzu
|
||||||
|
if cat "$temp_file" >> "$bashrc_file" 2>/dev/null; then
|
||||||
((profile_updated++))
|
((profile_updated++))
|
||||||
log "✅ Bash-Profile aktualisiert: $user_home/.bashrc"
|
log "✅ Bash-Profile aktualisiert: $bashrc_file"
|
||||||
else
|
else
|
||||||
warning "⚠️ Konnte Bash-Profile nicht aktualisieren: $user_home/.bashrc"
|
warning "⚠️ Konnte Bash-Profile nicht aktualisieren: $bashrc_file"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Aufräumen
|
||||||
|
rm -f "$temp_file" 2>/dev/null || true
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
debug "Überspringe nicht-existierendes/unlesbares .bashrc: $user_home/.bashrc"
|
debug ".bashrc existiert nicht: $bashrc_file"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
debug "Überspringe nicht-schreibbares Verzeichnis: $user_home"
|
debug "Verzeichnis nicht schreibbar: $user_home"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
@ -2042,6 +2059,12 @@ generate_ssl_certificate() {
|
|||||||
install_systemd_services() {
|
install_systemd_services() {
|
||||||
log "=== ROBUSTE SYSTEMD-SERVICES INSTALLATION ==="
|
log "=== ROBUSTE SYSTEMD-SERVICES INSTALLATION ==="
|
||||||
|
|
||||||
|
# Skip wenn Parameter gesetzt
|
||||||
|
if [ "$SKIP_SYSTEMD" = true ]; then
|
||||||
|
log "⏭️ Systemd-Service Installation übersprungen (--skip-systemd oder --wsl/--dev)"
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
# Validiere systemd-Verzeichnis
|
# Validiere systemd-Verzeichnis
|
||||||
if [ ! -d "$SYSTEMD_DIR" ]; then
|
if [ ! -d "$SYSTEMD_DIR" ]; then
|
||||||
error "systemd-Verzeichnis nicht gefunden: $SYSTEMD_DIR"
|
error "systemd-Verzeichnis nicht gefunden: $SYSTEMD_DIR"
|
||||||
@ -2124,6 +2147,12 @@ install_systemd_services() {
|
|||||||
enable_and_start_services() {
|
enable_and_start_services() {
|
||||||
log "=== ROBUSTE SERVICES AKTIVIERUNG UND START ==="
|
log "=== ROBUSTE SERVICES AKTIVIERUNG UND START ==="
|
||||||
|
|
||||||
|
# Skip wenn Parameter gesetzt
|
||||||
|
if [ "$SKIP_SYSTEMD" = true ]; then
|
||||||
|
log "⏭️ Service-Aktivierung übersprungen (--skip-systemd oder --wsl/--dev)"
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
# Service-Status tracking
|
# Service-Status tracking
|
||||||
local successful_services=0
|
local successful_services=0
|
||||||
local failed_services=0
|
local failed_services=0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user