From e63734ee2aed5033965bac239afe059253079763 Mon Sep 17 00:00:00 2001 From: Sven Date: Mon, 23 Mar 2026 12:12:56 +0100 Subject: [PATCH] fix(start): kill node process on service stop to prevent orphaned port binding Trap previously only killed the webmention poller, leaving the node process orphaned on service stop. On restart, the new node instance would fail to bind port 3000 (EADDRINUSE) causing 502s with clean logs. Co-Authored-By: Claude Sonnet 4.6 --- start.example.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/start.example.sh b/start.example.sh index 537bb307..9fb3603f 100644 --- a/start.example.sh +++ b/start.example.sh @@ -104,6 +104,6 @@ WEBMENTION_ORIGIN="${PUBLICATION_URL:-${SITE_URL:-}}" ) & POLLER_PID="$!" -trap 'kill "${POLLER_PID}" 2>/dev/null || true' EXIT INT TERM +trap 'kill "${INDIEKIT_PID}" "${POLLER_PID}" 2>/dev/null || true; wait "${INDIEKIT_PID}" 2>/dev/null || true' EXIT INT TERM wait "${INDIEKIT_PID}"