diff --git a/scripts/cloudron-setup b/scripts/cloudron-setup index 5d2984832..a9f39db22 100755 --- a/scripts/cloudron-setup +++ b/scripts/cloudron-setup @@ -52,8 +52,6 @@ sourceTarballUrl="" rebootServer="true" baseDataDir="" -echo "Running cloudron-setup with args : $@" > "${LOG_FILE}" - args=$(getopt -o "" -l "help,skip-baseimage-init,data-dir:,provider:,version:,env:,edition:,skip-reboot" -n "$0" -- "$@") eval set -- "${args}" @@ -93,6 +91,9 @@ if [[ "${ubuntu_version}" != "16.04" && "${ubuntu_version}" != "18.04" ]]; then exit 1 fi +# Can only write after we have confirmed script has root access +echo "Running cloudron-setup with args : $@" > "${LOG_FILE}" + # validate arguments in the absence of data if [[ -z "${provider}" ]]; then echo "--provider is required (azure, digitalocean, ec2, exoscale, gce, hetzner, lightsail, linode, ovh, rosehosting, scaleway, vultr or generic)"