Make HAProxy command dynamic

Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/5d645e0a
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/5d645e0a
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/5d645e0a

Branch: refs/heads/1843-feature-bigcouch
Commit: 5d645e0a052ce05a17598d445288c614f21ff1e0
Parents: bb5bdcc
Author: Russell Branca <[email protected]>
Authored: Mon Dec 23 14:43:27 2013 -0800
Committer: Robert Newson <[email protected]>
Committed: Tue Jan 28 15:52:27 2014 +0000

----------------------------------------------------------------------
 rel/boot_dev_cluster.sh | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/5d645e0a/rel/boot_dev_cluster.sh
----------------------------------------------------------------------
diff --git a/rel/boot_dev_cluster.sh b/rel/boot_dev_cluster.sh
index 4559141..a517fd4 100755
--- a/rel/boot_dev_cluster.sh
+++ b/rel/boot_dev_cluster.sh
@@ -3,6 +3,8 @@
 # Make log directory
 mkdir -p ./rel/logs/
 
+HAPROXY=`which haproxy`
+
 # Start each node
 ./rel/dev1/bin/couchdb > ./rel/logs/couchdb1.log 2>&1 &
 DB1_PID=$!
@@ -13,7 +15,7 @@ DB2_PID=$!
 ./rel/dev3/bin/couchdb > ./rel/logs/couchdb3.log 2>&1 &
 DB3_PID=$!
 
-/usr/local/sbin/haproxy -f rel/haproxy.cfg > ./rel/logs/haproxy.log 2>&1 &
+$HAPROXY -f rel/haproxy.cfg > ./rel/logs/haproxy.log 2>&1 &
 HP_PID=$!
 
 sleep 2

Reply via email to