Run shared Headroom proxy as the runtime user

This commit is contained in:
Alexandre
2026-07-10 14:21:05 +02:00
parent 9e87bf012d
commit cddd2956ca

View File

@@ -1,16 +1,11 @@
#!/usr/bin/with-contenv bashio #!/usr/bin/with-contenv bashio
# Headroom optimization proxy — runs ONLY as a local backend for the headroom MCP tools # Headroom optimization proxy — local backend for Claude Desktop MCP and Claude Code.
# (headroom_compress / headroom_retrieve, registered in 82-claude_tools.sh). It is NOT a
# traffic router: no client's ANTHROPIC_BASE_URL is pointed at it, so the Claude Desktop
# Electron app (which force-overrides ANTHROPIC_BASE_URL — headroom #869) and every other
# client are unaffected. Without this backend the MCP tools cannot store/retrieve compressed
# content and no savings are ever recorded.
declare port=8787 declare port=8787
declare host=127.0.0.1 declare host=127.0.0.1
if bashio::config.true 'install_headroom' && command -v headroom >/dev/null 2>&1; then if bashio::config.true 'install_headroom' && command -v headroom >/dev/null 2>&1; then
bashio::log.info "svc-headroom: starting headroom proxy on ${host}:${port}; dashboard available at /dashboard when the port is mapped (MCP backend only; no client routing)" bashio::log.info "svc-headroom: starting local Headroom proxy on ${host}:${port}"
exec headroom proxy --host "${host}" --port "${port}" --code-aware exec s6-setuidgid abc headroom proxy --host "${host}" --port "${port}" --code-aware
fi fi
bashio::log.info "svc-headroom: install_headroom disabled or headroom not found; idling" bashio::log.info "svc-headroom: install_headroom disabled or headroom not found; idling"