From c030c1f67a283f85652fa49260c4955c4bca404b Mon Sep 17 00:00:00 2001 From: farzin Date: Mon, 14 Sep 2020 00:29:40 +0430 Subject: [PATCH] checking for LTS kernel (ARCH) --- wireguard-install.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/wireguard-install.sh b/wireguard-install.sh index d450d99..e789e9e 100644 --- a/wireguard-install.sh +++ b/wireguard-install.sh @@ -143,7 +143,12 @@ function installWireGuard() { yum -y install epel-release kernel kernel-devel kernel-headers yum -y install wireguard-dkms wireguard-tools iptables qrencode elif [[ ${OS} == 'arch' ]]; then - pacman -S --noconfirm linux-headers + ARCH_LTS_KERNEL=$(pacman -Qs linux-lts) + if [[ -n ${ARCH_LTS_KERNEL} ]]; then + pacman -S --noconfirm linux-lts-headers + else + pacman -S --noconfirm linux-headers + fi pacman -S --noconfirm wireguard-tools iptables qrencode fi