#!usrbinenv bash set -euo pipefail HOST_PORT=${HOST_PORT-8100} PID=$(lsof -i tcp${HOST_PORT} -t 2devnull true) if [[ -z ${PID} ]]; then echo No process found on port ${HOST_PORT} exit 0 fi echo Stopping audio server (PID ${PID}) ... kill ${PID}