#!/bin/sh
set -eu

# Stop an existing collector before package payload replacement so install/repair
# can bind the local OTLP ports during postinstall.
if command -v launchctl >/dev/null 2>&1; then
  launchctl bootout system/com.beacon.endpoint.collector >/dev/null 2>&1 || true
fi

exit 0
