Skip to main content

Reference: installer exit codes

The installer (install.sh) uses distinct exit codes so you can branch on them in automation.

Exit codeMeaning
0Success. The agent is installed and the service was started.
1General error: a missing INSTALL_TOKEN with no existing credentials, a missing required command (curl, sha256sum, tar, jq), an unsupported architecture, a failed download, a registration 401, or no artifact for the platform.
2SHA-256 mismatch. A downloaded artifact did not match the manifest checksum. The bad file is deleted; nothing is installed and no service is started.

:::warning Exit code 2 is a security signal A 2 means a downloaded binary did not match its expected checksum. The installer aborts before extracting or running anything. Retry the install; if it persists, treat it as a possible tampering event. See Troubleshooting and Supply-chain trust. :::

Branching in automation

curl -sSL https://releases.atherops.com/otel-agent/install.sh | sudo INSTALL_TOKEN=<token> bash
rc=$?
case "$rc" in
0) echo "installed" ;;
2) echo "CHECKSUM MISMATCH — do not retry blindly; investigate"; exit 2 ;;
*) echo "install failed (rc=$rc)"; exit "$rc" ;;
esac

See also