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 <noreply@anthropic.com>
This commit is contained in:
2026-08-04 00:32:33 -04:00
parent 0c4abd82be
commit 7ae2472c62
2 changed files with 8 additions and 0 deletions
+3
View File
@@ -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