Skip to content

Instantly share code, notes, and snippets.

@austinsonger
Created January 19, 2024 17:35
Show Gist options
  • Save austinsonger/d2857a10b16cf07c10c68c11d324a851 to your computer and use it in GitHub Desktop.
Save austinsonger/d2857a10b16cf07c10c68c11d324a851 to your computer and use it in GitHub Desktop.
Install Pritunl & Wireguard
#!/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