From fddfb70b5657b07f87533277af043fee7d6bd2ae Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Fri, 23 May 2014 21:03:48 +0000 Subject: [PATCH] Get master address from slave userdata Conflicts: setup-slave.sh --- rust-buildbot-slave-stunnel.conf | 3 +-- setup-slave.sh | 11 +++++++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/rust-buildbot-slave-stunnel.conf b/rust-buildbot-slave-stunnel.conf index 68225cb..892a7e0 100644 --- a/rust-buildbot-slave-stunnel.conf +++ b/rust-buildbot-slave-stunnel.conf @@ -3,6 +3,5 @@ pid = [9987] client = yes accept = 127.0.0.1:9987 -connect = 10.22.112.51:9988 cafile = ./rust-bot-cert.pem -verify = 3 \ No newline at end of file +verify = 3 diff --git a/setup-slave.sh b/setup-slave.sh index 9e3b2d8..ba40ce3 100755 --- a/setup-slave.sh +++ b/setup-slave.sh @@ -2,8 +2,10 @@ if hostname | grep -q '^ip-' then + # Some images take time for the user data to appear + sleep 1 echo "Guessing we are on EC2, reading user-data" - read SLAVENAME PASSWORD <slave/info/admin echo $HOSTNAME >slave/info/host +cp rust-buildbot-slave-stunnel.conf rust-buildbot-slave-stunnel-final.conf +echo "connect = ${MASTER_ADDY:?}" >> rust-buildbot-slave-stunnel-final.conf + case $MACHTYPE in *-msys) # service will start via service console @@ -29,7 +36,7 @@ case $MACHTYPE in do if which $s then - $s rust-buildbot-slave-stunnel.conf || echo "stunnel startup failed, already running?" + $s rust-buildbot-slave-stunnel-final.conf || echo "stunnel startup failed, already running?" fi done echo "starting slave..."