From 22a1bb5847141ecdadf4e01d2f92483b6f0f7ef1 Mon Sep 17 00:00:00 2001 From: Petr Date: Sun, 15 Mar 2026 00:53:17 +0100 Subject: [PATCH] Auto-restart sync_data.sh after self-update (exec replaces process) --- scripts/sync_data.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/scripts/sync_data.sh b/scripts/sync_data.sh index 150e21d..6cd4bc5 100755 --- a/scripts/sync_data.sh +++ b/scripts/sync_data.sh @@ -69,10 +69,9 @@ if [[ -z "$DRY_RUN" ]]; then NEW_CHECKSUM=$(md5sum "$SCRIPT_PATH" 2>/dev/null | cut -d' ' -f1 || echo "none") if [[ "$OLD_CHECKSUM" != "$NEW_CHECKSUM" && "$OLD_CHECKSUM" != "none" ]]; then + echo " sync_data.sh updated, restarting with new version..." echo "" - echo "⚠️ sync_data.sh was updated! Run sync again to use the new version." - echo " Command: bash server/scripts/sync_data.sh" - exit 1 + exec bash "$SCRIPT_PATH" "$@" fi echo " ✅ Scripts up to date" fi