mirror of
https://github.com/angristan/wireguard-install.git
synced 2024-11-24 05:56:02 +03:00
AlmaLinux support added (#345)
This commit is contained in:
parent
193fe396a1
commit
99a199ffa5
@ -21,6 +21,7 @@ Supported distributions:
|
|||||||
- Debian >= 10
|
- Debian >= 10
|
||||||
- Fedora
|
- Fedora
|
||||||
- CentOS
|
- CentOS
|
||||||
|
- AlmaLinux
|
||||||
- Arch Linux
|
- Arch Linux
|
||||||
- Oracle Linux
|
- Oracle Linux
|
||||||
|
|
||||||
|
@ -42,6 +42,9 @@ function checkOS() {
|
|||||||
fi
|
fi
|
||||||
OS=debian # overwrite if raspbian
|
OS=debian # overwrite if raspbian
|
||||||
fi
|
fi
|
||||||
|
elif [[ -e /etc/almalinux-release ]]; then
|
||||||
|
source /etc/os-release
|
||||||
|
OS=almalinux
|
||||||
elif [[ -e /etc/fedora-release ]]; then
|
elif [[ -e /etc/fedora-release ]]; then
|
||||||
source /etc/os-release
|
source /etc/os-release
|
||||||
OS="${ID}"
|
OS="${ID}"
|
||||||
@ -54,7 +57,7 @@ function checkOS() {
|
|||||||
elif [[ -e /etc/arch-release ]]; then
|
elif [[ -e /etc/arch-release ]]; then
|
||||||
OS=arch
|
OS=arch
|
||||||
else
|
else
|
||||||
echo "Looks like you aren't running this installer on a Debian, Ubuntu, Fedora, CentOS, Oracle or Arch Linux system"
|
echo "Looks like you aren't running this installer on a Debian, Ubuntu, Fedora, CentOS, AlmaLinux, Oracle or Arch Linux system"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
@ -145,6 +148,12 @@ function installWireGuard() {
|
|||||||
dnf install -y wireguard-dkms
|
dnf install -y wireguard-dkms
|
||||||
fi
|
fi
|
||||||
dnf install -y wireguard-tools iptables qrencode
|
dnf install -y wireguard-tools iptables qrencode
|
||||||
|
elif [[ ${OS} == 'almalinux' ]]; then
|
||||||
|
dnf -y install epel-release elrepo-release
|
||||||
|
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
|
||||||
@ -381,6 +390,12 @@ function uninstallWg() {
|
|||||||
dnf copr disable -y jdoss/wireguard
|
dnf copr disable -y jdoss/wireguard
|
||||||
fi
|
fi
|
||||||
dnf autoremove -y
|
dnf autoremove -y
|
||||||
|
elif [[ ${OS} == 'almalinux' ]]; then
|
||||||
|
dnf -y remove wireguard-tools qrencode
|
||||||
|
if [[ ${VERSION_ID} == 8* ]]; then
|
||||||
|
dnf -y remove kmod-wireguard
|
||||||
|
fi
|
||||||
|
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
|
||||||
yum -y autoremove
|
yum -y autoremove
|
||||||
|
Loading…
Reference in New Issue
Block a user