Files
KlugesEck-light-show/start_klugeseck.sh

51 lines
1.5 KiB
Bash
Executable File
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/usr/bin/env bash
# kleines Autostart-Skript für QLC+ Show "KlugesEck"
REPO_DIR="/home/alxs/Dokumente/KlugesEck-light-show"
PROJECT_FILE="$REPO_DIR/KlugesEckV1.qxw"
FIXTURES_SRC="$REPO_DIR/Fixtures"
FIXTURES_DST="/home/alxs/.qlcplus/fixtures"
LOGFILE="/home/alxs/qlc-autostart.log"
{
echo "=============================="
echo "$(date): Starte KlugesEck-Autostart-Skript"
echo "Repo: $REPO_DIR"
# 1) Ins Repo wechseln und git pull
if [ -d "$REPO_DIR" ]; then
cd "$REPO_DIR" || {
echo "Fehler: Kann nicht ins Repo-Verzeichnis wechseln."
}
echo "Führe git pull aus ..."
if git pull --ff-only; then
echo "git pull erfolgreich."
else
echo "WARNUNG: git pull fehlgeschlagen (offline? Auth-Problem?)."
echo "Benutze bestehende lokale Dateien weiter."
fi
else
echo "Fehler: Repo-Verzeichnis $REPO_DIR existiert nicht."
fi
# 2) Fixtures vom Repo in ~/.qlcplus/fixtures kopieren
if [ -d "$FIXTURES_SRC" ]; then
echo "Aktualisiere Fixtures ..."
mkdir -p "$FIXTURES_DST"
# gesamter Inhalt von Fixtures nach ~/.qlcplus/fixtures
cp -a "$FIXTURES_SRC"/. "$FIXTURES_DST"/
echo "Fixtures aktualisiert."
else
echo "WARNUNG: Fixtures-Ordner $FIXTURES_SRC existiert nicht."
fi
# 3) QLC+ mit dem Projekt aus dem Repo starten
echo "Starte QLC+ mit Projektdatei: $PROJECT_FILE"
# WICHTIG: Kein & hier das Skript wird selbst im Autostart im Hintergrund gestartet
qlcplus --web --operate -o "$PROJECT_FILE"
echo "QLC+ wurde beendet (oder Start fehlgeschlagen)."
} >> "$LOGFILE" 2>&1