From 7ae2472c62c5fac7deacf855674bfe71b29a245f Mon Sep 17 00:00:00 2001 From: William Mantly Date: Tue, 4 Aug 2026 00:32:33 -0400 Subject: [PATCH] fix: stop theta-agent before overwriting binary (v1.35.15) cp into a running executable fails with 'Text file busy' on a re-install. Stop the service before copying the prebuilt binary. Co-Authored-By: Claude --- CHANGELOG.md | 5 +++++ setup.sh | 3 +++ 2 files changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2df6fcf..ac0378a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,11 @@ orchestration code; see each submodule's own `CHANGELOG.md` [sso-manager-node](https://github.com/theta42/sso-manager-node/blob/master/CHANGELOG.md)) for what changed inside the apps it composes. +## [v1.35.15] - 2026-08-04 + +### Fixed +- **theta-agent re-install failed with "Text file busy"** — setup.sh copied the prebuilt binary over a running agent service, which cp refuses. It now stops the service before copying. + ## [v1.35.14] - 2026-08-04 ### Fixed diff --git a/setup.sh b/setup.sh index a11221e..ada2fd8 100755 --- a/setup.sh +++ b/setup.sh @@ -1213,6 +1213,9 @@ if [[ "$CFG_THETA_AGENT_ENABLE" == "1" ]]; then sudo sed -i "s|https://sso.example.com|https://${SSO_HOST}|" /etc/theta42/agent.yml fi fi + # Stop a running agent before overwriting its binary (cp into a + # running executable fails with "Text file busy" on a re-install). + sudo systemctl stop theta-agent.service 2>/dev/null || true sudo cp theta-agent-linux-amd64 /usr/local/bin/theta-agent sudo chmod +x /usr/local/bin/theta-agent