aboutsummaryrefslogtreecommitdiff
path: root/script/dev-cluster.sh
diff options
context:
space:
mode:
authorQuentin Dufour <quentin@deuxfleurs.fr>2021-10-04 18:27:57 +0200
committerQuentin Dufour <quentin@deuxfleurs.fr>2021-10-19 16:56:07 +0200
commitdc017a0cab40cb2f33a01b420bb1b04038abb875 (patch)
tree239b6a9245b842a4daaceead93b71d8ddbeab498 /script/dev-cluster.sh
parent1acf7e4c66aab0a0b5bcce8eb2965b35d587dd2a (diff)
downloadgarage-feature/static.tar.gz
garage-feature/static.zip
Build Garage with Nixfeature/static
Diffstat (limited to 'script/dev-cluster.sh')
-rwxr-xr-xscript/dev-cluster.sh9
1 files changed, 8 insertions, 1 deletions
diff --git a/script/dev-cluster.sh b/script/dev-cluster.sh
index bb5f9a08..0afdd97c 100755
--- a/script/dev-cluster.sh
+++ b/script/dev-cluster.sh
@@ -6,7 +6,8 @@ SCRIPT_FOLDER="`dirname \"$0\"`"
REPO_FOLDER="${SCRIPT_FOLDER}/../"
GARAGE_DEBUG="${REPO_FOLDER}/target/debug/"
GARAGE_RELEASE="${REPO_FOLDER}/target/release/"
-PATH="${GARAGE_DEBUG}:${GARAGE_RELEASE}:$PATH"
+NIX_RELEASE="${REPO_FOLDER}/result/bin/"
+PATH="${GARAGE_DEBUG}:${GARAGE_RELEASE}:${NIX_RELEASE}:$PATH"
FANCYCOLORS=("41m" "42m" "44m" "45m" "100m" "104m")
export RUST_BACKTRACE=1
@@ -63,7 +64,13 @@ fi
(garage server -c /tmp/config.$count.toml 2>&1|while read r; do echo -en "$LABEL $r\n"; done) &
done
+RETRY=120
until garage status 2>&1|grep -q Healthy ; do
+ (( RETRY-- ))
+ if (( RETRY <= 0 )); then
+ echo -en "${MAIN_LABEL} Garage did not start"
+ exit 1
+ fi
echo -en "${MAIN_LABEL} cluster starting...\n"
sleep 1
done