From 8a3f22ba65a18378c0130dad97a56cc4d5dff9c3 Mon Sep 17 00:00:00 2001 From: hwdsl2 Date: Fri, 4 Dec 2020 23:39:35 -0600 Subject: [PATCH] Update Debian check - Add check for Debian 8 (not supported) --- extras/vpnupgrade.sh | 5 +++++ vpnsetup.sh | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/extras/vpnupgrade.sh b/extras/vpnupgrade.sh index ce572e2..d81db03 100644 --- a/extras/vpnupgrade.sh +++ b/extras/vpnupgrade.sh @@ -33,6 +33,11 @@ if ! printf '%s' "$os_type" | head -n 1 | grep -qiF -e ubuntu -e debian -e raspb exit 1 fi +debian_ver=$(sed 's/\..*//' /etc/debian_version) +if [ "$debian_ver" = "8" ]; then + exiterr "Debian 8 is not supported." +fi + if [ -f /proc/user_beancounters ]; then exiterr "OpenVZ VPS is not supported." fi diff --git a/vpnsetup.sh b/vpnsetup.sh index a42c0cd..87906fd 100755 --- a/vpnsetup.sh +++ b/vpnsetup.sh @@ -60,7 +60,11 @@ if ! printf '%s' "$os_type" | head -n 1 | grep -qiF -e ubuntu -e debian -e raspb exit 1 fi -if [ "$(sed 's/\..*//' /etc/debian_version)" = "10" ] && [ ! -e /dev/ppp ]; then +debian_ver=$(sed 's/\..*//' /etc/debian_version) +if [ "$debian_ver" = "8" ]; then + exiterr "Debian 8 is not supported." +fi +if [ "$debian_ver" = "10" ] && [ ! -e /dev/ppp ]; then exiterr "/dev/ppp is missing. Debian 10 users, see: https://git.io/vpndebian10" fi