kolla/docker/haproxy/ensure_latest_config.sh
Jeffrey Zhang de6650874d Start the haproxy by using haproxy-system-wrapper
haproxy-system-wrapper is a solution for systemd from upstream. it can
handle the reload graceful.

Change-Id: I6a3d141af065e429bd1be1b7252f5c6df1fda3bb
Closes-Bug: #1559238
2016-03-30 18:07:40 +08:00

15 lines
384 B
Bash

#!/bin/bash
set -o errexit
CURRENT_CONFIG_HASH=$(sha1sum /etc/haproxy/haproxy.cfg | cut -f1 -d' ')
NEW_CONFIG_HASH=$(sha1sum /var/lib/kolla/config_files/haproxy.cfg | cut -f1 -d' ')
if [[ $CURRENT_CONFIG_HASH != $NEW_CONFIG_HASH ]]; then
changed=changed
python /usr/local/bin/kolla_set_configs
kill -USR2 $(pgrep -f /usr/sbin/haproxy-systemd-wrapper)
fi
echo $changed