From 5a126d9ad55d289e06351b195888f8b2aa2d122e Mon Sep 17 00:00:00 2001 From: karl anderson Date: Wed, 1 Mar 2017 12:00:00 -0800 Subject: [PATCH] update the sock location to match the config change --- system/sbin/kazoo-haproxy | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/system/sbin/kazoo-haproxy b/system/sbin/kazoo-haproxy index 3b2d7c2..7c42a39 100755 --- a/system/sbin/kazoo-haproxy +++ b/system/sbin/kazoo-haproxy @@ -34,7 +34,7 @@ start() { return fi - if echo "show stat" | nc -U /tmp/haproxy.sock > /dev/null 2>&1; then + if echo "show stat" | nc -U /var/run/haproxy/haproxy.sock > /dev/null 2>&1; then echo "HAProxy is already running!" return fi @@ -72,7 +72,7 @@ status() { local STATS="pxname svname qcur qmax scur smax slim stot bin bout dreq dresp ereq econ eresp wretr wredis status weight act bck chkfail chdown lastchg downtime qlimit pid iid sid throttle lbtot tracked type rate rate_lim rate_max check_status check_code check_duration hrsp_1xx hrsp_2xx hrsp_3xx hrsp_4xx hrsp_5xx hrsp_other hanafail req_rate req_rate_max req_tot cli_abrt srv_abrt" local TABLE_HEADER="Host|25 Backend|15 Status Active Rate 1xx 2xx 3xx 4xx 5xx Ping" local TABLE_VARS="svname|25 pxname|15 status scur req_rate hrsp_1xx hrsp_2xx hrsp_3xx hrsp_4xx hrsp_5xx check_duration" - if ! echo "show stat" | nc -U /tmp/haproxy.sock > /dev/null 2>&1; then + if ! echo "show stat" | nc -U /var/run/haproxy/haproxy.sock > /dev/null 2>&1; then echo "Unable to connect to HAProxy, ensure it is running!" return fi @@ -88,7 +88,7 @@ status() { printf "%-${SIZE}s |" $NAME done echo - echo "show stat" | nc -U /tmp/haproxy.sock \ + echo "show stat" | nc -U /var/run/haproxy/haproxy.sock \ | while IFS=',' read ${STATS}; do if [ -z "$svname" ]; then continue