aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXavier Le Vourch <xavier.levourch@xlv-labs.com>2022-11-21 09:55:18 -0800
committerGitHub <noreply@github.com>2022-11-21 18:55:18 +0100
commit99a199ffa51dbafcfe1c42f94c51b04c336e0404 (patch)
tree910589c1e437a5e20a9ffe4b22893e11e99a6da2
parent193fe396a18682c0c90684f03af0efed5043e2a2 (diff)
AlmaLinux support added (#345)
-rw-r--r--README.md1
-rw-r--r--wireguard-install.sh17
2 files changed, 17 insertions, 1 deletions
diff --git a/README.md b/README.md
index c1162a0..2045bef 100644
--- a/README.md
+++ b/README.md
@@ -21,6 +21,7 @@ Supported distributions:
- Debian >= 10
- Fedora
- CentOS
+- AlmaLinux
- Arch Linux
- Oracle Linux
diff --git a/wireguard-install.sh b/wireguard-install.sh
index ff602b9..41b5ba2 100644
--- a/wireguard-install.sh
+++ b/wireguard-install.sh
@@ -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,12 @@ 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 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
@@ -381,6 +390,12 @@ function uninstallWg() {
dnf copr disable -y jdoss/wireguard
fi
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
yum -y remove kmod-wireguard wireguard-tools qrencode
yum -y autoremove