diff --git a/start.example.sh b/start.example.sh index 7097f7c2..feb5ad9d 100644 --- a/start.example.sh +++ b/start.example.sh @@ -62,14 +62,15 @@ INDIEKIT_PID="$!" # Webmention sender — polls every 5 minutes (see @rmdes/indiekit-endpoint-webmention-sender README) WEBMENTION_POLL_INTERVAL="${WEBMENTION_SENDER_POLL_INTERVAL:-300}" -WEBMENTION_ENDPOINT="http://127.0.0.1:${PORT:-3000}${WEBMENTION_SENDER_MOUNT_PATH:-/webmention-sender}" +INDIEKIT_LOCAL_URL="http://${INDIEKIT_BIND_HOST:-127.0.0.1}:${PORT:-3000}" +WEBMENTION_ENDPOINT="${INDIEKIT_LOCAL_URL}${WEBMENTION_SENDER_MOUNT_PATH:-/webmention-sender}" WEBMENTION_ORIGIN="${PUBLICATION_URL:-${SITE_URL:-}}" ( echo "[webmention] Starting auto-send polling every ${WEBMENTION_POLL_INTERVAL}s (${WEBMENTION_ENDPOINT})" # Wait for indiekit to be ready before first poll (up to 2 minutes) _i=0 - until curl -sf "http://127.0.0.1:${PORT:-3000}/status" -o /dev/null 2>&1; do + until curl -sf "${INDIEKIT_LOCAL_URL}/status" -o /dev/null 2>&1; do _i=$((_i + 1)) [ $_i -lt 60 ] || { echo "[webmention] Warning: indiekit not ready after 120s, proceeding anyway"; break; } sleep 2