Files
haproxy-manager-base/scripts/start-up.sh
Josh Knapp b731feab12
All checks were successful
HAProxy Manager Build and Push / Build-and-Push (push) Successful in 3m26s
Self-heal trusted IP whitelist files at startup
Volume-mounted /etc/haproxy can shadow the image-baked
trusted_ips.list/trusted_ips.map, causing HAProxy to fail
config validation with "failed to open pattern file" on
non-WHP deployments. Touch empty files if they don't exist
so the ACLs always parse.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-30 10:02:16 -07:00

13 lines
365 B
Bash

#!/usr/bin/env bash
# Exit on error
set -eo pipefail
# Ensure trusted IP whitelist files exist (volume-mounted /etc/haproxy may shadow image defaults)
mkdir -p /etc/haproxy
[ -f /etc/haproxy/trusted_ips.list ] || : > /etc/haproxy/trusted_ips.list
[ -f /etc/haproxy/trusted_ips.map ] || : > /etc/haproxy/trusted_ips.map
cron &
python /haproxy/haproxy_manager.py