diff --git a/bin/emqx b/bin/emqx index 96f6ec42f..ed66dee68 100755 --- a/bin/emqx +++ b/bin/emqx @@ -20,6 +20,10 @@ mkdir -p "$RUNNER_LOG_DIR" # Make sure data directory exists mkdir -p "$RUNNER_DATA_DIR" +# Make sure data/configs exists +CONFIGS_DIR="$RUNNER_DATA_DIR/configs" +mkdir -p "$CONFIGS_DIR" + # hocon try to read environment variables starting with "EMQX_" export HOCON_ENV_OVERRIDE_PREFIX='EMQX_' @@ -204,39 +208,48 @@ generate_config() { EMQX_LICENSE_CONF_OPTION="-c ${EMQX_LICENSE_CONF}" fi - set +e - # disable shellcheck; let EMQX_LICENSE_CONF_OPTION split + ## timestamp for each generation + local NOW_TIME + NOW_TIME="$("$ERTS_PATH"/escript "$RUNNER_ROOT_DIR"/bin/hocon now_time)" + + ## ths command populates two files: app.