Skip to content

Commit

Permalink
fix SSL issues with wget and replace it with curl
Browse files Browse the repository at this point in the history
  • Loading branch information
mluhmann committed Jan 4, 2024
1 parent 2371090 commit 00360b5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions setup.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/sh

function validate_url(){
if [[ `wget -S --spider $1 2>&1 | grep 'HTTP/1.1 200 OK'` ]]; then
if [[ `curl --insecure -L --fail -I -s $1 2>&1 | grep 'HTTP/1.1 302 Found'` ]]; then
return 0
else
return 1
Expand Down Expand Up @@ -131,7 +131,7 @@ case "$RUNTIME" in
;;
esac
### Download and unzip balenaEngine
wget "$BALENA_URL"
curl --insecure -L --fail "$BALENA_URL" -o ./balena-engine-v${VERSION}-${arch}.tar.gz
tar xzv -C /usr/bin --strip-components=1 -f balena-engine-v${VERSION}-${arch}.tar.gz
rm balena-engine-v${VERSION}-${arch}.tar.gz
if [ -d /usr/bin/balena-engine ]; then
Expand Down Expand Up @@ -259,4 +259,4 @@ cat <<EOF
Docker installation successful!
EOF
;;
esac
esac

0 comments on commit 00360b5

Please sign in to comment.