From 4b664b7e472c80bb674b78be32ef26d1c000f994 Mon Sep 17 00:00:00 2001 From: Nyr Date: Wed, 20 May 2020 12:04:26 +0200 Subject: [PATCH] Detect OpenVZ 6 --- wireguard-install.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/wireguard-install.sh b/wireguard-install.sh index dc635b9..9b54a8e 100644 --- a/wireguard-install.sh +++ b/wireguard-install.sh @@ -19,6 +19,12 @@ if [[ "$EUID" -ne 0 ]]; then exit fi +# Detect OpenVZ 6 +if [[ $(uname -r | cut -d "." -f 1) -eq 2 ]]; then + echo "The system is running an old kernel, which is incompatible with this installer" + exit +fi + # Detect OS # $os_version variables aren't always in use, but are kept here for convenience if grep -qs "ubuntu" /etc/os-release; then