From e12f680f9685e7376410990184ded9e354fec726 Mon Sep 17 00:00:00 2001 From: Xavier Le Vourch Date: Sun, 5 Jun 2022 09:50:37 -0700 Subject: [PATCH] support for AlmaLinux 9, kmod-wireguard is only for version 8 --- wireguard-install.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/wireguard-install.sh b/wireguard-install.sh index db4ec49..e6af89a 100644 --- a/wireguard-install.sh +++ b/wireguard-install.sh @@ -150,7 +150,10 @@ function installWireGuard() { dnf install -y wireguard-tools iptables qrencode elif [[ ${OS} == 'almalinux' ]]; then dnf -y install epel-release elrepo-release - dnf -y install kmod-wireguard wireguard-tools iptables qrencode + dnf -y install wireguard-tools iptables qrencode + if [[ ${VERSION_ID} == 8* ]]; then + dnf -y install kmod-wireguard + fi elif [[ ${OS} == 'centos' ]]; then yum -y install epel-release elrepo-release if [[ ${VERSION_ID} -eq 7 ]]; then @@ -387,7 +390,10 @@ function uninstallWg() { fi dnf autoremove -y elif [[ ${OS} == 'almalinux' ]]; then - dnf -y remove kmod-wireguard wireguard-tools qrencode + dnf -y remove wireguard-tools qrencode + if [[ ${VERSION_ID} == 8* ]]; then + dnf -y remove kmod-wireguard + fi dnf -y autoremove elif [[ ${OS} == 'centos' ]]; then yum -y remove kmod-wireguard wireguard-tools qrencode