aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStanislas Lange <git@slange.me>2023-01-22 12:11:19 +0100
committerStanislas Lange <git@slange.me>2023-01-22 12:11:19 +0100
commit2f7e346767a1996aa89a33c24d845881947842d6 (patch)
tree8862b5a85e0e81d9cb78eff1366051d998553587
parent5b483ecb8913e48bd670bfea43e5664a8ebce199 (diff)
Fix Ubuntu detection
-rw-r--r--wireguard-install.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/wireguard-install.sh b/wireguard-install.sh
index 1be20cd..97cf3f1 100644
--- a/wireguard-install.sh
+++ b/wireguard-install.sh
@@ -39,6 +39,12 @@ function checkOS() {
exit 1
fi
OS=debian # overwrite if raspbian
+ elif [[ ${OS} == "ubuntu" ]]; then
+ RELEASE_YEAR=$(echo "${VERSION_ID}" | cut -d'.' -f1)
+ if [[ ${RELEASE_YEAR} -lt 18 ]]; then
+ echo "Your version of Ubuntu (${VERSION_ID}) is not supported. Please use Ubuntu 18.04 or later"
+ exit 1
+ fi
elif [[ ${OS} == "fedora" ]]; then
if [[ ${VERSION_ID} -lt 32 ]]; then
echo "Your version of Fedora (${VERSION_ID}) is not supported. Please use Fedora 32 or later"