2015-08-27 18:04:30 -07:00
|
|
|
#!/bin/bash
|
|
|
|
|
2016-03-19 00:24:44 +08:00
|
|
|
set -o errexit
|
|
|
|
|
2015-08-27 18:04:30 -07:00
|
|
|
CURRENT_CONFIG_HASH=$(sha1sum /etc/haproxy/haproxy.cfg | cut -f1 -d' ')
|
2015-10-01 07:43:18 +00:00
|
|
|
NEW_CONFIG_HASH=$(sha1sum /var/lib/kolla/config_files/haproxy.cfg | cut -f1 -d' ')
|
2015-08-27 18:04:30 -07:00
|
|
|
|
|
|
|
if [[ $CURRENT_CONFIG_HASH != $NEW_CONFIG_HASH ]]; then
|
|
|
|
changed=changed
|
2015-10-01 07:43:18 +00:00
|
|
|
python /usr/local/bin/kolla_set_configs
|
2016-03-19 00:24:44 +08:00
|
|
|
kill -USR2 $(pgrep -f /usr/sbin/haproxy-systemd-wrapper)
|
2015-08-27 18:04:30 -07:00
|
|
|
fi
|
|
|
|
|
|
|
|
echo $changed
|