Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
exit 1
  • Loading branch information
johnstcn committed Jul 12, 2022
commit 51235b955a18c44f600cec277913aab3868a93c7
8 changes: 4 additions & 4 deletions provisionersdk/scripts/bootstrap_linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,22 @@ BINARY_URL=${ACCESS_URL}bin/coder-linux-${ARCH}
cd "$BINARY_DIR"
if command -v curl >/dev/null 2>&1; then
curl -fsSL --compressed "${BINARY_URL}" -o "${BINARY_NAME}" || (
echo "error: failed to download coder agent" && sleep 600
echo "error: failed to download coder agent" && sleep 600 && exit 1
)
elif command -v wget >/dev/null 2>&1; then
wget -q "${BINARY_URL}" -O "${BINARY_NAME}" || (
echo "error: failed to download coder agent" && sleep 600
echo "error: failed to download coder agent" && sleep 600 && exit 1
)
elif command -v busybox >/dev/null 2>&1; then
busybox wget -q "${BINARY_URL}" -O "${BINARY_NAME}" || (
echo "error: failed to download coder agent" && sleep 600
echo "error: failed to download coder agent" && sleep 600 && exit 1
)
else
echo "error: no download tool found, please install curl, wget or busybox wget"
exit 1
fi
chmod +x $BINARY_NAME || (
echo "Failed to make $BINARY_NAME executable" && sleep 600
echo "Failed to make $BINARY_NAME executable" && sleep 600 && exit 1
)
export CODER_AGENT_AUTH="${AUTH_TYPE}"
export CODER_AGENT_URL="${ACCESS_URL}"
Expand Down