diff --git a/scripts/cloudron-setup b/scripts/cloudron-setup index c507d10d8..62b662c18 100755 --- a/scripts/cloudron-setup +++ b/scripts/cloudron-setup @@ -166,18 +166,6 @@ if ! sourceTarballUrl=$(echo "${releaseJson}" | python3 -c 'import json,sys;obj= exit 1 fi -# Build data -# from 1.9, we use autoprovision.json -data=$(cat < Downloading version ${version} ..." box_src_tmp_dir=$(mktemp -dt box-src-XXXXXX) @@ -195,9 +183,31 @@ if [[ "${initBaseImage}" == "true" ]]; then echo "" fi +# NOTE: this install script only supports 3.x and above echo "=> Installing version ${version} (this takes some time) ..." -mkdir -p /etc/cloudron -cat > "/etc/cloudron/cloudron.conf" < "${DATA_FILE}" + + if ! /bin/bash "${box_src_tmp_dir}/scripts/installer.sh" --data-file "${DATA_FILE}" &>> "${LOG_FILE}"; then + echo "Failed to install cloudron. See ${LOG_FILE} for details" + exit 1 + fi + + rm "${DATA_FILE}" +else + mkdir -p /etc/cloudron + cat > "/etc/cloudron/cloudron.conf" < "/etc/cloudron/cloudron.conf" <> "${LOG_FILE}"; then - echo "Failed to install cloudron. See ${LOG_FILE} for details" - exit 1 + if ! /bin/bash "${box_src_tmp_dir}/scripts/installer.sh" &>> "${LOG_FILE}"; then + echo "Failed to install cloudron. See ${LOG_FILE} for details" + exit 1 + fi fi echo -n "=> Waiting for cloudron to be ready (this takes some time) ..."