cloudron-setup: Log arguments later

This commit is contained in:
Girish Ramakrishnan
2018-10-25 11:31:39 -07:00
parent 81ac44b7da
commit 2e3ddba7e5

View File

@@ -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)"