diff --git a/setup/bootstrap.sh b/setup/bootstrap.sh index 499722d0..c3729112 100644 --- a/setup/bootstrap.sh +++ b/setup/bootstrap.sh @@ -7,23 +7,13 @@ ######################################################### if [ -z "$TAG" ]; then - # If a version to install isn't explicitly given as an environment - # variable, then install the latest version. But the latest version - # depends on the operating system. Existing Ubuntu 14.04 users need - # to be able to upgrade to the latest version supporting Ubuntu 14.04, - # in part because an upgrade is required before jumping to Ubuntu 18.04. - # New users on Ubuntu 18.04 need to get the latest version number too. - # - # Also, the system status checks read this script for TAG = (without the - # space, but if we put it in a comment it would confuse the status checks!) - # to get the latest version, so the first such line must be the one that we - # want to display in status checks. - if [ "`lsb_release -d | sed 's/.*:\s*//' `" == "Debian GNU/Linux 10 (buster)" ]; then + # Make s + OS=`lsb_release -d | sed 's/.*:\s*//'` + if [ "$OS" == "Debian GNU/Linux 10 (buster)" -o "$OS" == "Ubuntu 20.04 LTS"]; then # This machine is running Ubuntu 18.04. TAG=v0.44.POWER.5 - else - echo "This script must be run on a system running Debian 10." + echo "This script must be run on a system running Debian 10 OR Ubuntu 20.04 LTS." exit 1 fi fi diff --git a/setup/functions.sh b/setup/functions.sh index cdf89bed..509d3dc0 100644 --- a/setup/functions.sh +++ b/setup/functions.sh @@ -215,4 +215,11 @@ function git_clone { rm -rf $TMPPATH } -export PHP_VERSION="7.3" # Expected php version +OS=`lsb_release -d | sed 's/.*:\s*//' ` + +# Expected php version +if [ "$OS" == "Debian GNU/Linux 10 (buster)" ]; then + export PHP_VERSION="7.3" +elif [ "$OS" == "Ubuntu 20.04 LTS" ]; then + export PHP_VERSION="7.4" +fi diff --git a/setup/preflight.sh b/setup/preflight.sh index 8e3fbdd7..51952693 100644 --- a/setup/preflight.sh +++ b/setup/preflight.sh @@ -8,8 +8,9 @@ if [[ $EUID -ne 0 ]]; then fi # Check that we are running on Debian GNU/Linux -if [ "`lsb_release -d | sed 's/.*:\s*//' `" != "Debian GNU/Linux 10 (buster)" ]; then - echo "Mail-in-a-Box only supports being installed on Debian 10, sorry. You are running:" +OS=`lsb_release -d | sed 's/.*:\s*//' ` +if [ "$OS" != "Debian GNU/Linux 10 (buster)" -a "$OS" != "Ubuntu 20.04 LTS" ]; then + echo "Mail-in-a-Box only supports being installed on Debian 10 or Ubuntu 20.04 LTS, sorry. You are running:" echo lsb_release -d | sed 's/.*:\s*//' echo