mirror of
https://github.com/angristan/wireguard-install.git
synced 2025-04-05 03:43:30 +03:00
AlmaLinux support added
This commit is contained in:
parent
4dfbc55cd9
commit
b559fb304c
2 changed files with 11 additions and 1 deletions
|
@ -21,6 +21,7 @@ Supported distributions:
|
|||
- Debian >= 10
|
||||
- Fedora
|
||||
- CentOS
|
||||
- AlmaLinux
|
||||
- Arch Linux
|
||||
- Oracle Linux
|
||||
|
||||
|
|
|
@ -42,6 +42,9 @@ function checkOS() {
|
|||
fi
|
||||
OS=debian # overwrite if raspbian
|
||||
fi
|
||||
elif [[ -e /etc/almalinux-release ]]; then
|
||||
source /etc/os-release
|
||||
OS=almalinux
|
||||
elif [[ -e /etc/fedora-release ]]; then
|
||||
source /etc/os-release
|
||||
OS="${ID}"
|
||||
|
@ -54,7 +57,7 @@ function checkOS() {
|
|||
elif [[ -e /etc/arch-release ]]; then
|
||||
OS=arch
|
||||
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
|
||||
fi
|
||||
}
|
||||
|
@ -145,6 +148,9 @@ function installWireGuard() {
|
|||
dnf install -y wireguard-dkms
|
||||
fi
|
||||
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
|
||||
elif [[ ${OS} == 'centos' ]]; then
|
||||
yum -y install epel-release elrepo-release
|
||||
if [[ ${VERSION_ID} -eq 7 ]]; then
|
||||
|
@ -380,6 +386,9 @@ function uninstallWg() {
|
|||
dnf copr disable -y jdoss/wireguard
|
||||
fi
|
||||
dnf autoremove -y
|
||||
elif [[ ${OS} == 'almalinux' ]]; then
|
||||
dnf -y remove kmod-wireguard wireguard-tools qrencode
|
||||
dnf -y autoremove
|
||||
elif [[ ${OS} == 'centos' ]]; then
|
||||
yum -y remove kmod-wireguard wireguard-tools qrencode
|
||||
yum -y autoremove
|
||||
|
|
Loading…
Add table
Reference in a new issue