Files
auto_agent/llm_server/stop_audio.sh
T

14 lines
253 B
Bash

#!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}