refine haproxy config in background mode