Füge Korrektur für den Pfad der Konfigurationsdatei hinzu
- 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.
This commit is contained in:
@@ -10,6 +10,14 @@ echo "=== YourChat - Konfigurations-Update Script ==="
|
||||
CONFIG_SOURCE="config/chatconfig.json"
|
||||
CONFIG_TARGET="/opt/yourchat/config/chatconfig.json"
|
||||
|
||||
# Korrigiere falls die Datei am falschen Ort liegt
|
||||
if [ -f "/opt/yourchat/chatconfig.json" ] && [ ! -f "$CONFIG_TARGET" ]; then
|
||||
echo "Korrigiere Konfigurationsdatei-Pfad..."
|
||||
sudo mv /opt/yourchat/chatconfig.json "$CONFIG_TARGET"
|
||||
sudo chown yourchat:yourchat "$CONFIG_TARGET"
|
||||
sudo chmod 644 "$CONFIG_TARGET"
|
||||
fi
|
||||
|
||||
# Prüfe ob Quell-Konfiguration existiert
|
||||
if [ ! -f "$CONFIG_SOURCE" ]; then
|
||||
echo "Fehler: Quell-Konfiguration $CONFIG_SOURCE nicht gefunden."
|
||||
|
||||
Reference in New Issue
Block a user