aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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"