From d94b5fcab19c53922c9ce53f9964d31296dec71e Mon Sep 17 00:00:00 2001 From: Brenden Matthews Date: Wed, 20 Jul 2016 09:40:30 -0700 Subject: [PATCH] Use `pidof` instead of pidfile w/ reload. (#268) When doing a graceful reload, use `pidof haproxy` rather than catting the pidfile to make sure that we send SIGUSR1 to _all_ existing HAProxy instances. This is to address #267. --- service/haproxy/run | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/service/haproxy/run b/service/haproxy/run index ca91dabf..52ee4d18 100755 --- a/service/haproxy/run +++ b/service/haproxy/run @@ -38,7 +38,7 @@ reload() { socat /var/run/haproxy/socket - <<< "show servers state" > /var/state/haproxy/global # Trigger reload - haproxy -p $PIDFILE -f /marathon-lb/haproxy.cfg -D -sf $(cat $PIDFILE) + haproxy -p $PIDFILE -f /marathon-lb/haproxy.cfg -D -sf $(pidof haproxy) # Remove the firewall rules removeFirewallRules