#!/bin/bash # Master-Skript zur Wiederherstellung und Installation des Frontends # Dieses Skript führt die nötigen Schritte aus, um auf Torbens Frontend zurückzukehren set -e # Beende das Skript bei Fehlern SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" LOG_FILE="$SCRIPT_DIR/frontend-fix.log" # Logfunktion log() { echo "$(date '+%Y-%m-%d %H:%M:%S') - $1" | tee -a "$LOG_FILE" } # Lösche Log-Datei, falls vorhanden > "$LOG_FILE" log "Beginne Frontend-Wiederherstellung und Installation" # Stelle sicher, dass die Skripte ausführbar sind chmod +x "$SCRIPT_DIR/packages/restore-torben-frontend.sh" chmod +x "$SCRIPT_DIR/packages/install-torben-frontend.sh" # Führe das Wiederherstellungsskript aus log "Führe Wiederherstellungsskript aus..." "$SCRIPT_DIR/packages/restore-torben-frontend.sh" # Führe das Installationsskript aus log "Führe Installationsskript aus..." "$SCRIPT_DIR/packages/install-torben-frontend.sh" log "Der Wiederherstellungs- und Installationsprozess ist abgeschlossen." log "" log "Um das Frontend zu starten:" log " cd $SCRIPT_DIR/packages/reservation-platform && pnpm dev" log "" log "Um das Backend zu starten:" log " cd $SCRIPT_DIR/backend && source venv/bin/activate && python app.py" log "" log "Um das Backend automatisch beim Systemstart zu starten, führe aus (als root):" log " sudo $SCRIPT_DIR/backend/autostart-backend.sh"