diff --git a/setup/preflight.sh b/setup/preflight.sh index 2105ebec..a4e7b5cf 100644 --- a/setup/preflight.sh +++ b/setup/preflight.sh @@ -8,11 +8,13 @@ if [[ $EUID -ne 0 ]]; then exit 1 fi -# Check that we are running on Ubuntu 20.04 LTS (or 20.04.xx). -if [ "$( lsb_release --id --short )" != "Ubuntu" ] || [ "$( lsb_release --release --short )" != "22.04" ]; then +. /etc/os-release + +# Check that we are running on Ubuntu 22.04 LTS (or 22.04.xx). +if [ "${ID:-}" != "ubuntu" ] || [ "${VERSION_ID:-}" != "22.04" ]; then echo "Mail-in-a-Box only supports being installed on Ubuntu 22.04, sorry. You are running:" echo - lsb_release --description --short + echo "${ID:-"Unknown linux distribution"} ${VERSION_ID:-}" echo echo "We can't write scripts that run on every possible setup, sorry." exit 1