From 2e3ddba7e570ef8d6dbf9f6d5aea4451acb61961 Mon Sep 17 00:00:00 2001 From: Girish Ramakrishnan Date: Thu, 25 Oct 2018 11:31:39 -0700 Subject: [PATCH] cloudron-setup: Log arguments later --- scripts/cloudron-setup | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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)"