1
1
mirror of https://github.com/angristan/wireguard-install.git synced 2024-06-06 05:20:49 +00:00

support for AlmaLinux 9, kmod-wireguard is only for version 8

This commit is contained in:
Xavier Le Vourch 2022-06-05 09:50:37 -07:00
parent b559fb304c
commit e12f680f96

View File

@ -150,7 +150,10 @@ function installWireGuard() {
dnf install -y wireguard-tools iptables qrencode dnf install -y wireguard-tools iptables qrencode
elif [[ ${OS} == 'almalinux' ]]; then elif [[ ${OS} == 'almalinux' ]]; then
dnf -y install epel-release elrepo-release 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 elif [[ ${OS} == 'centos' ]]; then
yum -y install epel-release elrepo-release yum -y install epel-release elrepo-release
if [[ ${VERSION_ID} -eq 7 ]]; then if [[ ${VERSION_ID} -eq 7 ]]; then
@ -387,7 +390,10 @@ function uninstallWg() {
fi fi
dnf autoremove -y dnf autoremove -y
elif [[ ${OS} == 'almalinux' ]]; then 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 dnf -y autoremove
elif [[ ${OS} == 'centos' ]]; then elif [[ ${OS} == 'centos' ]]; then
yum -y remove kmod-wireguard wireguard-tools qrencode yum -y remove kmod-wireguard wireguard-tools qrencode