From 1b9d9664b263f44be4d1c1e2152dcc721de49f0c Mon Sep 17 00:00:00 2001 From: "Torsten Schulz (local)" Date: Fri, 17 Apr 2026 13:45:53 +0200 Subject: [PATCH] refactor(update-backend): reorder permission settings and update migration message - Moved permission setting commands to the end of the script for better clarity and execution flow. - Changed the log message from "Running database synchronization..." to "Running database migrations..." to accurately reflect the operation being performed. - Ensured that permission settings for backend and data directories are consistently applied after the migration process. [force-deploy] --- update-backend.sh | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/update-backend.sh b/update-backend.sh index 6fb9f11..7354ecd 100755 --- a/update-backend.sh +++ b/update-backend.sh @@ -48,17 +48,12 @@ if [ -f "$BACKEND_DIR/.env" ]; then else echo "⚠ WARNUNG: Keine .env-Datei in $BACKEND_DIR gefunden!" fi -echo "Setting permissions..." -sudo -n chown -R yourpart:yourpart "$BACKEND_DIR" -sudo -n chmod -R 755 "$BACKEND_DIR" -sudo -n chown -R yourpart:yourpart "$DATA_DIR" -sudo -n chmod -R 755 "$DATA_DIR" echo "Updating systemd service..." sudo -n cp "$TARGET_DIR/yourpart.service" /etc/systemd/system/ sudo -n systemctl daemon-reload -echo "Running database synchronization..." +echo "Running database migrations..." cd "$BACKEND_DIR" export STAGE="$STAGE" @@ -75,4 +70,10 @@ else echo "Legacy sync-db übersprungen (Standard)." fi +echo "Setting permissions..." +sudo -n chown -R yourpart:yourpart "$BACKEND_DIR" +sudo -n chmod -R 755 "$BACKEND_DIR" +sudo -n chown -R yourpart:yourpart "$DATA_DIR" +sudo -n chmod -R 755 "$DATA_DIR" + echo "Backend update completed!"