From c3301c24453aa1c34562feb2048c683088f7cf79 Mon Sep 17 00:00:00 2001 From: TechArtDev Date: Thu, 5 Feb 2026 12:04:07 +0200 Subject: [PATCH] Update openclaw_assistant/run.sh Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- openclaw_assistant/run.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/openclaw_assistant/run.sh b/openclaw_assistant/run.sh index 38faaf8..925b19f 100644 --- a/openclaw_assistant/run.sh +++ b/openclaw_assistant/run.sh @@ -244,7 +244,10 @@ GW_PID=$! # Start web terminal (optional) # Kill any stray ttyd processes from previous runs to avoid port conflicts -pkill -f "ttyd.*-p.*-b /terminal" || true +TTYD_PATTERN="ttyd .* -i 127.0.0.1 .* -p ${TERMINAL_PORT} .* -b /terminal" +if pgrep -f "$TTYD_PATTERN" >/dev/null 2>&1; then + pkill -f "$TTYD_PATTERN" || true +fi if [ "$ENABLE_TERMINAL" = "true" ] || [ "$ENABLE_TERMINAL" = "1" ]; then echo "Starting web terminal (ttyd) on 127.0.0.1:${TERMINAL_PORT} ..."