Delete haproxy_status.sh

This commit is contained in:
Alexander Kukushkin
2015-07-08 11:50:16 +02:00
parent b36764b517
commit e2def822b7
-16
View File
@@ -1,16 +0,0 @@
#!/bin/bash
while true
do {
response=$(echo "SELECT pg_is_in_recovery();" | psql -t postgres --port $2 --host $1 2> /dev/null | tr -d "\n")
if [ "${response}" == " f" ]
then
echo "HTTP/1.1 200 OK"
echo "X-XLOG-POSITION: $(echo "SELECT pg_current_xlog_location();" | psql -t postgres --port $2 --host $1 2> /dev/null | tr -d ' ' | head -n 1)"
else
echo "HTTP/1.1 503 Service unavailable"
echo "X-XLOG-POSITION: $(echo "SELECT pg_last_xlog_replay_location();" | psql -t postgres --port $2 --host $1 2> /dev/null | tr -d ' ' | head -n 1)"
fi
} | nc -l $3; done