added autostart and start refresh script file
This commit is contained in:
8
autostart-file.md
Normal file
8
autostart-file.md
Normal file
@ -0,0 +1,8 @@
|
||||
|
||||
|
||||
This was the old start line:
|
||||
qlcplus --web --operate -o "/home/alxs//Dokumente/KlugesEckV1.qxw" &
|
||||
|
||||
I changed this than to the new start scrip to auto refresh the project and fixture files
|
||||
/home/alxs/Dokumente/KlugesEck-light-show/start_klugeseck.sh &
|
||||
|
||||
51
start_klugeseck.sh
Normal file
51
start_klugeseck.sh
Normal file
@ -0,0 +1,51 @@
|
||||
#!/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
|
||||
Reference in New Issue
Block a user