From 4a68f8a2f160cf4bdb70ab864c0f73fbcfaea4b8 Mon Sep 17 00:00:00 2001 From: makhov Date: Thu, 12 Dec 2024 13:41:55 +0200 Subject: [PATCH] Retry logic for k0s download process --- index.html | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index 75086b0..e38aa24 100755 --- a/index.html +++ b/index.html @@ -48,7 +48,10 @@ echo "Downloading k0s from URL: $k0sDownloadUrl" - curl -sSLf "$k0sDownloadUrl" >"$k0sInstallPath/$k0sBinary" + for _ in 1 2 3 4 5; do + curl -sSLf "$k0sDownloadUrl" >"$k0sInstallPath/$k0sBinary" && break || echo "Waiting 10 seconds before retry..." && sleep 10; + done + chmod 755 -- "$k0sInstallPath/$k0sBinary" echo "k0s is now executable in $k0sInstallPath"