Skip to content

Commit

Permalink
Add OpenSUSE support (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
conradgg authored May 19, 2024
1 parent 2e31a00 commit bcd949a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Supported distributions:
- CentOS Stream >= 8
- Debian >= 11
- Fedora >= 32
- OpenSUSE
- Oracle Linux
- Rocky Linux >= 8
- Ubuntu >= 18.04
Expand Down
6 changes: 5 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 [[ -e /etc/SUSE-brand ]]; then
OS=opensuse
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, OpenSUSE or Arch Linux system"
exit 1
fi
}
Expand Down Expand Up @@ -209,6 +211,8 @@ function installWireGuard() {
dnf install -y wireguard-tools qrencode iptables
elif [[ ${OS} == 'arch' ]]; then
pacman -S --needed --noconfirm wireguard-tools qrencode
elif [[ ${OS} == 'opensuse' ]]; then
zypper install -y wireguard-tools qrencode
fi
# Make sure the directory exists (this does not seem the be the case on fedora)
Expand Down

0 comments on commit bcd949a

Please sign in to comment.