Skip to content

Commit 9be489f

Browse files
committed
PKG-262 hetzner: retry downloading GO binary for 3 times
1 parent 99697e9 commit 9be489f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packaging/scripts/mongodb-backup_builder.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,11 @@ install_golang() {
141141
elif [ x"$ARCH" = "xaarch64" ]; then
142142
GO_ARCH="arm64"
143143
fi
144-
wget https://go.dev/dl/go1.22.8.linux-${GO_ARCH}.tar.gz -O /tmp/go1.22.tar.gz
144+
for i in {1..3}; do
145+
wget https://go.dev/dl/go1.22.8.linux-${GO_ARCH}.tar.gz -O /tmp/go1.22.tar.gz && break
146+
echo "Failed to download GOLang, retrying in 10 seconds..."
147+
sleep 10
148+
done
145149
tar --transform=s,go,go1.22, -zxf /tmp/go1.22.tar.gz
146150
rm -rf /usr/local/go*
147151
mv go1.22 /usr/local/

0 commit comments

Comments
 (0)