cp truncates the destination in place, which fails with ETXTBSY when the binary is currently executing (e.g. running update.sh while the systemd service is active). Copy to a temp file and mv it into place instead - mv is a rename within the same filesystem, which the kernel allows even for a running binary. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>