Created
October 31, 2023 13:37
-
-
Save sarkrui/349eae4707ac318a3db697ddbc012b91 to your computer and use it in GitHub Desktop.
Install cloudflared
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Identify the operating system and architecture | |
OS=$(uname -s) | |
ARCH=$(uname -m) | |
# Install based on system distribution | |
if [ "$OS" == "Linux" ]; then | |
if [ "$ARCH" == "x86_64" ]; then | |
curl -L --output cloudflared.deb https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64.deb | |
dpkg -i cloudflared.deb | |
elif [ "$ARCH" == "aarch64" ]; then | |
curl -L --output cloudflared.deb https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-arm64.deb | |
dpkg -i cloudflared.deb | |
else | |
echo "Unsupported architecture." | |
exit 1 | |
fi | |
elif [ "$OS" == "Darwin" ]; then | |
brew install cloudflare/cloudflare/cloudflared | |
else | |
echo "Unsupported operating system." | |
exit 1 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
One-click Installation