deduce primary ip adress and ask it for replication status
[pgpool-online-recovery] / Makefile
index 73ac605..9b6ecb1 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,9 @@
+PRIMARY=$(shell ./t/99-primary-ip.sh)
+
 all:
        @echo "make push"
        PAGER= psql -h 10.200.1.60 -c 'show pool_nodes' postgres postgres
-       PAGER= psql -h 10.200.1.61 -c 'SELECT * from pg_stat_replication' postgres postgres
+       PAGER= psql -h $(PRIMARY) -c 'SELECT * from pg_stat_replication' postgres postgres
 
 init:
        sh -xe ./t/0-init-cluster.sh