diff --git a/wireguard-install.sh b/wireguard-install.sh index e789e9e..94692a6 100644 --- a/wireguard-install.sh +++ b/wireguard-install.sh @@ -143,8 +143,9 @@ 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 - ARCH_LTS_KERNEL=$(pacman -Qs linux-lts) - if [[ -n ${ARCH_LTS_KERNEL} ]]; then + # Check if current running kernel is LTS + ARCH_KERNEL_RELEASE=$(uname -r) + if [[ ${ARCH_KERNEL_RELEASE} == *lts* ]]; then pacman -S --noconfirm linux-lts-headers else pacman -S --noconfirm linux-headers