From bcd949a6119b9accb7469c38d9dc2db7bdf069e6 Mon Sep 17 00:00:00 2001 From: Conrad Lane Date: Mon, 20 May 2024 02:45:58 +0700 Subject: [PATCH] Add OpenSUSE support (#4) --- README.md | 1 + wireguard-install.sh | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 42f4ad3b..83d34bfa 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,7 @@ Supported distributions: - CentOS Stream >= 8 - Debian >= 11 - Fedora >= 32 +- OpenSUSE - Oracle Linux - Rocky Linux >= 8 - Ubuntu >= 18.04 diff --git a/wireguard-install.sh b/wireguard-install.sh index 6a0cd68b..c1d74a5b 100644 --- a/wireguard-install.sh +++ b/wireguard-install.sh @@ -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 } @@ -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)