Created
January 19, 2024 17:35
-
-
Save austinsonger/d2857a10b16cf07c10c68c11d324a851 to your computer and use it in GitHub Desktop.
Install Pritunl & Wireguard
This file contains 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 | |
# Function to check if Homebrew is installed | |
check_and_install_brew() { | |
if ! command -v brew &> /dev/null | |
then | |
echo "Homebrew not installed. Installing now..." | |
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" | |
else | |
echo "Homebrew is already installed." | |
fi | |
} | |
# Function to install Pritunl and WireGuard | |
install_pritunl_and_wireguard() { | |
echo "Updating Homebrew..." | |
brew update | |
echo "Installing Pritunl..." | |
brew install --cask pritunl | |
echo "Installing WireGuard..." | |
brew install wireguard-tools | |
} | |
# Check and install Homebrew | |
check_and_install_brew | |
# Install Pritunl and WireGuard | |
install_pritunl_and_wireguard | |
echo "Installation completed successfully." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment