Implement auto-registration

This commit is contained in:
Girish Ramakrishnan
2019-05-07 14:15:35 -07:00
parent 58696c5132
commit 866321da4d
5 changed files with 49 additions and 7 deletions

View File

@@ -49,7 +49,7 @@ webServerOrigin="https://cloudron.io"
sourceTarballUrl=""
rebootServer="true"
args=$(getopt -o "" -l "help,skip-baseimage-init,provider:,version:,env:,skip-reboot" -n "$0" -- "$@")
args=$(getopt -o "" -l "help,skip-baseimage-init,provider:,version:,env:,skip-reboot,license:" -n "$0" -- "$@")
eval set -- "${args}"
while true; do
@@ -66,6 +66,7 @@ while true; do
webServerOrigin="https://staging.cloudron.io"
fi
shift 2;;
--license) license="$2"; shift 2;;
--skip-baseimage-init) initBaseImage="false"; shift;;
--skip-reboot) rebootServer="false"; shift;;
--) break;;
@@ -205,6 +206,8 @@ cat > "/etc/cloudron/cloudron.conf" <<CONF_END
}
CONF_END
[[ -n "${license}" ]] && echo "$license" > /etc/cloudron/LICENSE
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