From f3c63e2f8d5904c146273a7e4b3dc58f640811b3 Mon Sep 17 00:00:00 2001 From: twentyOne2x Date: Fri, 19 Jun 2026 23:39:23 +0200 Subject: [PATCH] Restart Leo agent after Telegram deploy changes --- deploy/auto-deploy.sh | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/deploy/auto-deploy.sh b/deploy/auto-deploy.sh index 94b68fd..7fa799b 100755 --- a/deploy/auto-deploy.sh +++ b/deploy/auto-deploy.sh @@ -88,15 +88,24 @@ log "Files synced" # Restart services only if Python files changed RESTART="" +add_restart() { + case " $RESTART " in + *" $1 "*) ;; + *) RESTART="$RESTART $1" ;; + esac +} if [ "$OLD_SHA" != "none" ]; then if git diff --name-only "$OLD_SHA" "$NEW_SHA" -- lib/ teleo-pipeline.py reweave.py telegram/ 2>/dev/null | grep -q '\.py$'; then - RESTART="$RESTART teleo-pipeline" + add_restart teleo-pipeline + fi + if git diff --name-only "$OLD_SHA" "$NEW_SHA" -- telegram/ 2>/dev/null | grep -q '\.py$'; then + add_restart teleo-agent@leo fi if git diff --name-only "$OLD_SHA" "$NEW_SHA" -- diagnostics/ 2>/dev/null | grep -q '\.py$'; then - RESTART="$RESTART teleo-diagnostics" + add_restart teleo-diagnostics fi else - RESTART="teleo-pipeline teleo-diagnostics" + RESTART="teleo-pipeline teleo-diagnostics teleo-agent@leo" fi if [ -n "$RESTART" ]; then