SurfSense/plugins/remote/host/entrypoint.sh
Anish Sarkar ea9fa9d497 feat(plugins): run SurfSense's TikTok scraper as its own plugin
proprietary/tiktok/ is the backend's TikTok scraper behind four tools, scrape,
comments, trending and user_search, at /tiktok/mcp, licensed like Reddit.
TikTok withholds profile feeds from a headless browser, so the image installs
Xvfb and host/entrypoint.sh starts it when CRAWL_HEADED_XVFB_ENABLED is true,
then execs the host so it still gets the container's signals.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 12:07:21 +05:30

10 lines
440 B
Bash
Executable file

#!/bin/sh
# Starts a virtual display when a plugin wants a headed browser (TikTok's profile
# feeds, withheld from headless Chromium), then hands the process to the host.
set -e
if [ "$(echo "${CRAWL_HEADED_XVFB_ENABLED:-false}" | tr '[:upper:]' '[:lower:]')" = "true" ]; then
display="${XVFB_DISPLAY:-:99}"
Xvfb "$display" -screen 0 1920x1080x24 -nolisten tcp >/dev/null 2>&1 &
export DISPLAY="$display"
fi
exec python -m host