Skip to content

fix: make agent scripts easier to troubleshoot #2922

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Jul 13, 2022
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