aboutsummaryrefslogtreecommitdiff
path: root/docker/haproxy/start.sh
blob: 629c852544efabf4db64d52ef0e6a38bd6ca0d30 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/bash
set -o errexit

# Loading common functions.
source /opt/kolla/kolla-common.sh

# Generate run command
python /opt/kolla/set_configs.py
CMD=$(cat /run_command)

# We are intentionally not using exec so we can reload the haproxy config later
$CMD

# TODO(SamYaple): This has the potential for a race condition triggered by a
#                 config reload that could cause the container to exit
while [[ -e "/proc/$(cat /run/haproxy.pid)" ]]; do
    sleep 5
done