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 <noreply@anthropic.com>
This commit is contained in:
@@ -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}"
|
||||
|
||||
Reference in New Issue
Block a user