From 1a94e7cd45e85bff954eb27403f94b96cfe62880 Mon Sep 17 00:00:00 2001 From: "Torsten Schulz (local)" Date: Mon, 1 Sep 2025 16:13:45 +0200 Subject: [PATCH] =?UTF-8?q?F=C3=BCge=20Korrektur=20f=C3=BCr=20den=20Pfad?= =?UTF-8?q?=20der=20Konfigurationsdatei=20hinzu?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Implementiere eine Überprüfung in den Skripten `install.sh` und `update_config.sh`, um sicherzustellen, dass die Konfigurationsdatei an dem richtigen Ort liegt. Falls nicht, wird die Datei verschoben und die Berechtigungen sowie der Eigentümer entsprechend angepasst. --- deploy/install.sh | 8 ++++++++ deploy/update_config.sh | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/deploy/install.sh b/deploy/install.sh index 5bcfa27..8f77aaf 100755 --- a/deploy/install.sh +++ b/deploy/install.sh @@ -35,6 +35,14 @@ else echo "Konfigurationsdatei existiert bereits - wird nicht überschrieben." fi +# Korrigiere falls die Datei am falschen Ort liegt +if [ -f "/opt/yourchat/chatconfig.json" ] && [ ! -f "/opt/yourchat/config/chatconfig.json" ]; then + echo "Korrigiere Konfigurationsdatei-Pfad..." + sudo mv /opt/yourchat/chatconfig.json /opt/yourchat/config/ + sudo chown yourchat:yourchat /opt/yourchat/config/chatconfig.json + sudo chmod 644 /opt/yourchat/config/chatconfig.json +fi + # Systemd Service erstellen echo "=== Systemd Service erstellen ===" sudo tee /etc/systemd/system/yourchat.service > /dev/null <