refactor: always use hocon to generate config
previously we supports skipping config generation if USE_CUTTLEFISH not set to true. it has never been tested (at least not in automated tests) now it's time to drop it.
This commit is contained in:
parent
4b174b0277
commit
5546d24b6d
12
bin/emqx
12
bin/emqx
|
@ -123,9 +123,6 @@ fi
|
||||||
# Echo to stderr on errors
|
# Echo to stderr on errors
|
||||||
echoerr() { echo "$@" 1>&2; }
|
echoerr() { echo "$@" 1>&2; }
|
||||||
|
|
||||||
# By default, use hocon to generate app.config and vm.args
|
|
||||||
HOCON="${USE_HOCON:-yes}"
|
|
||||||
|
|
||||||
SED_REPLACE="sed -i "
|
SED_REPLACE="sed -i "
|
||||||
case $(sed --help 2>&1) in
|
case $(sed --help 2>&1) in
|
||||||
*GNU*) SED_REPLACE="sed -i ";;
|
*GNU*) SED_REPLACE="sed -i ";;
|
||||||
|
@ -202,14 +199,6 @@ generate_config() {
|
||||||
## changing the config 'log.rotation.size'
|
## changing the config 'log.rotation.size'
|
||||||
rm -rf "${RUNNER_LOG_DIR}"/*.siz
|
rm -rf "${RUNNER_LOG_DIR}"/*.siz
|
||||||
|
|
||||||
if [ "$HOCON" != "yes" ]; then
|
|
||||||
# Note: we have added a parameter '-vm_args' to this. It
|
|
||||||
# appears redundant but it is not! the erlang vm allows us to
|
|
||||||
# access all arguments to the erl command EXCEPT '-args_file',
|
|
||||||
# so in order to get access to this file location from within
|
|
||||||
# the vm, we need to pass it in twice.
|
|
||||||
CONFIG_ARGS=" -config $RUNNER_ETC_DIR/app.config -args_file $RUNNER_ETC_DIR/vm.args -vm_args $RUNNER_ETC_DIR/vm.args "
|
|
||||||
else
|
|
||||||
EMQX_LICENSE_CONF_OPTION=""
|
EMQX_LICENSE_CONF_OPTION=""
|
||||||
if [ "${EMQX_LICENSE_CONF:-}" != "" ]; then
|
if [ "${EMQX_LICENSE_CONF:-}" != "" ]; then
|
||||||
EMQX_LICENSE_CONF_OPTION="-i ${EMQX_LICENSE_CONF}"
|
EMQX_LICENSE_CONF_OPTION="-i ${EMQX_LICENSE_CONF}"
|
||||||
|
@ -249,7 +238,6 @@ generate_config() {
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
mv -f "$TMP_ARG_FILE" "$HOCON_GEN_ARG_FILE"
|
mv -f "$TMP_ARG_FILE" "$HOCON_GEN_ARG_FILE"
|
||||||
fi
|
|
||||||
|
|
||||||
# shellcheck disable=SC2086
|
# shellcheck disable=SC2086
|
||||||
if ! relx_nodetool chkconfig $CONFIG_ARGS; then
|
if ! relx_nodetool chkconfig $CONFIG_ARGS; then
|
||||||
|
|
Loading…
Reference in New Issue