Skip to content
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

Add Amazon Linux support #534

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
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
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ WireGuard does not fit your environment? Check out [openvpn-install](https://git
Supported distributions:

- AlmaLinux >= 8
- Amazon Linux
- Arch Linux
- CentOS Stream >= 8
- Debian >= 10
Expand Down
11 changes: 10 additions & 1 deletion wireguard-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,10 @@ function checkOS() {
OS=oracle
elif [[ -e /etc/arch-release ]]; then
OS=arch
elif [[ ${ID} == "amzn" ]] || [[ ${ID_LIKE} == *"amzn"* ]]; then
OS=amazon
else
echo "Looks like you aren't running this installer on a Debian, Ubuntu, Fedora, CentOS, AlmaLinux, Oracle or Arch Linux system"
echo "Looks like you aren't running this installer on a Debian, Ubuntu, Fedora, CentOS, AlmaLinux, Oracle, Amazon or Arch Linux system"
exit 1
fi
}
Expand Down Expand Up @@ -204,6 +206,11 @@ function installWireGuard() {
dnf install -y wireguard-tools qrencode iptables
elif [[ ${OS} == 'arch' ]]; then
pacman -S --needed --noconfirm wireguard-tools qrencode
elif [[ ${OS} == 'amazon' ]]; then
# Amazon Linux specific installation
yum update -y
amazon-linux-extras install epel -y
yum install -y wireguard-tools iptables qrencode
fi

# Make sure the directory exists (this does not seem the be the case on fedora)
Expand Down Expand Up @@ -458,6 +465,8 @@ function uninstallWg() {
yum remove --noautoremove wireguard-tools qrencode
elif [[ ${OS} == 'arch' ]]; then
pacman -Rs --noconfirm wireguard-tools qrencode
elif [[ ${OS} == 'amazon' ]]; then
yum remove -y --noautoremove wireguard-tools qrencode
fi

rm -rf /etc/wireguard
Expand Down
Loading