Match only haproxy for docker ps and skipp all *-haproxy occurences
The grep regexp can match several lines if the haproxy pattern is present. By matching only the started by a whitespace it will match the haproxy container listed by docker ps: [...] Up 17 hours neutron-haproxy-qrouter [...] Up 20 hours haproxy-bundle-docker- Change-Id: Id63991e862ab10170c8afbde7a11677cc3d2e2f6
This commit is contained in:
parent
e2bbd55a45
commit
a472f7d513
@ -98,7 +98,7 @@ resources:
|
||||
elif [[ $HAPROXY_TLS_UPDATE_NEEDED -eq 0 ]]; then
|
||||
# Handles reloading HAProxy and fetching a new certificate if
|
||||
# necessary
|
||||
HAPROXY_CONTAINER_ID=$(docker ps | grep haproxy | awk '{print $1}')
|
||||
HAPROXY_CONTAINER_ID=$(docker ps | grep '[[:space:]]haproxy' | awk '{print $1}')
|
||||
if [[ -n "$HAPROXY_CONTAINER_ID" ]]; then
|
||||
if [[ "$pacemaker_status" == "active" ]]; then
|
||||
# We copy the certificate from the mount point to the desired
|
||||
|
Loading…
x
Reference in New Issue
Block a user