From 8cdb0c596885935452ca3cf24f9ec041d07ef4ef Mon Sep 17 00:00:00 2001 From: xiagw Date: Mon, 21 Sep 2020 14:01:12 +0700 Subject: [PATCH] remove duplicate if -d /etc/debian_version (#136) --- wireguard-install.sh | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/wireguard-install.sh b/wireguard-install.sh index d450d99..c752dbf 100644 --- a/wireguard-install.sh +++ b/wireguard-install.sh @@ -31,12 +31,10 @@ function checkOS() { if [[ -e /etc/debian_version ]]; then source /etc/os-release OS="${ID}" # debian or ubuntu - if [[ -e /etc/debian_version ]]; then - if [[ ${ID} == "debian" || ${ID} == "raspbian" ]]; then - if [[ ${VERSION_ID} -ne 10 ]]; then - echo "Your version of Debian (${VERSION_ID}) is not supported. Please use Debian 10 Buster" - exit 1 - fi + if [[ ${ID} == "debian" || ${ID} == "raspbian" ]]; then + if [[ ${VERSION_ID} -ne 10 ]]; then + echo "Your version of Debian (${VERSION_ID}) is not supported. Please use Debian 10 Buster" + exit 1 fi fi elif [[ -e /etc/fedora-release ]]; then