From ab29703a7b0bbcd9bae034a21e0d659e98e6f272 Mon Sep 17 00:00:00 2001 From: Micah Anderson Date: Tue, 1 Nov 2016 14:33:27 -0400 Subject: add job parallelization to node starting --- bin/lut.sh | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/bin/lut.sh b/bin/lut.sh index 01903e2..9a06581 100755 --- a/bin/lut.sh +++ b/bin/lut.sh @@ -102,20 +102,37 @@ cleanup () { } start_nodes () { + + FAIL=0 + echo "Starting all the VMs, you should go do something else now, this will take a while..." # monarch: monitor, tor hidden service, webapp - leap vm add monarch + leap vm add monarch & # dogface: couchdb/soledad - leap vm add dogface + leap vm add dogface & # hairstreak: mx - leap vm add hairstreak + leap vm add hairstreak & # checkerspot: openvn, need a gateway address to do openvpn, disabled # spicebush: static node, with hidden service, disabled because static service is not tested # leap vm add spicebush # cloak: tor exit - leap vm add cloak + leap vm add cloak & # swallowtail: singlenode - leap vm add swallowtail + leap vm add swallowtail & + + for job in `jobs -p` + do + wait $job || let "FAIL+=1" + done + + if [ "$FAIL" == "0" ]; + then + echo "Nodes started successfully!" + else + echo "Something happened starting a node ($FAIL)!" + cleanup 1 + fi + } deploy () { -- cgit v1.2.3