mirror of
https://github.com/angristan/wireguard-install.git
synced 2024-11-24 13:47:40 +00:00
Fix Ubuntu detection
This commit is contained in:
parent
5b483ecb89
commit
2f7e346767
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user