From 378851eeff50c0e9ec1d6ed39d72805ce95c0177 Mon Sep 17 00:00:00 2001 From: Anthony Scalisi Date: Thu, 26 Mar 2015 12:35:36 -0700 Subject: [PATCH] fix haproxy_status.sh to trim new lines --- haproxy_status.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/haproxy_status.sh b/haproxy_status.sh index 570af9d6..1ddf5899 100755 --- a/haproxy_status.sh +++ b/haproxy_status.sh @@ -2,7 +2,7 @@ while true do { - response=$(echo "SELECT pg_is_in_recovery();" | psql -t postgres --port $2 --host $1 2> /dev/null) + response=$(echo "SELECT pg_is_in_recovery();" | psql -t postgres --port $2 --host $1 2> /dev/null | tr -d "\n") if [ "${response}" == " f" ] then