diff --git a/rel/files/emqttd b/rel/files/emqttd index 5157e28bc..83b0368d0 100755 --- a/rel/files/emqttd +++ b/rel/files/emqttd @@ -134,10 +134,10 @@ case "$1" in echo "Node is already running!" exit 1 fi - # Sanity check the app.config file - RES=`$NODETOOL_LITE chkconfig $RUNNER_ETC_DIR/app.config` + # Sanity check the emqttd.config file + RES=`$NODETOOL_LITE chkconfig $RUNNER_ETC_DIR/emqttd.config` if [ $? != 0 ]; then - echo "Error reading $RUNNER_ETC_DIR/app.config" + echo "Error reading $RUNNER_ETC_DIR/emqttd.config" echo $RES exit 1 fi @@ -258,10 +258,10 @@ case "$1" in echo "Node is already running - use '$SCRIPT attach' instead" exit 1 fi - # Sanity check the app.config file - RES=`$NODETOOL_LITE chkconfig $RUNNER_ETC_DIR/app.config` + # Sanity check the emqttd.config file + RES=`$NODETOOL_LITE chkconfig $RUNNER_ETC_DIR/emqttd.config` if [ $? != 0 ]; then - echo "Error reading $RUNNER_ETC_DIR/app.config" + echo "Error reading $RUNNER_ETC_DIR/emqttd.config" echo $RES exit 1 fi @@ -279,7 +279,7 @@ case "$1" in EMU=beam PROGNAME=`echo $0 | sed 's/.*\///'` CMD="$BINDIR/erlexec -boot $RUNNER_BASE_DIR/releases/$APP_VSN/$SCRIPT \ - -embedded -config $RUNNER_ETC_DIR/app.config -config $RUNNER_ETC_DIR/plugins.config \ + -embedded -config $RUNNER_ETC_DIR/emqttd.config -config $RUNNER_ETC_DIR/plugins.config \ -pa $RUNNER_LIB_DIR/basho-patches \ -args_file $RUNNER_ETC_DIR/vm.args -- ${1+"$@"}" export EMU @@ -299,9 +299,9 @@ case "$1" in exec $CMD ;; chkconfig) - RES=`$NODETOOL_LITE chkconfig $RUNNER_ETC_DIR/app.config` + RES=`$NODETOOL_LITE chkconfig $RUNNER_ETC_DIR/emqttd.config` if [ $? != 0 ]; then - echo "Error reading $RUNNER_ETC_DIR/app.config" + echo "Error reading $RUNNER_ETC_DIR/emqttd.config" echo $RES exit 1 fi diff --git a/rel/files/emqttd.config b/rel/files/emqttd.config index 6b4867c33..e350c184c 100644 --- a/rel/files/emqttd.config +++ b/rel/files/emqttd.config @@ -60,6 +60,11 @@ {max_clientid_len, 1024}, {max_packet_size, 4096} ]}, + %% MQTT Client + {mqtt_client, [ + %TODO: Network ingoing limit + %{ingoing_rate_limit, '64KB/s'} + ]}, %% MQTT Session {mqtt_session, [ {expires, 24}, %hour diff --git a/rel/files/nodetool b/rel/files/nodetool index 0eb69df9e..09c2b86ef 100755 --- a/rel/files/nodetool +++ b/rel/files/nodetool @@ -190,7 +190,7 @@ consult(Cont, Str, Acc) -> %% -%% Validation functions for checking the app.config +%% Validation functions for checking the emqttd.config %% validate([Terms]) -> Results = [ValidateFun(Terms) || ValidateFun <- get_validation_funs()], @@ -207,8 +207,8 @@ get_validation_funs() -> [ ]. print_issue({warning, Warning}) -> - io:format(standard_error, "Warning in app.config: ~s~n", [Warning]); + io:format(standard_error, "Warning in emqttd.config: ~s~n", [Warning]); print_issue({error, Error}) -> - io:format(standard_error, "Error in app.config: ~s~n", [Error]). + io:format(standard_error, "Error in emqttd.config: ~s~n", [Error]). diff --git a/rel/files/start_erl.cmd b/rel/files/start_erl.cmd index c0f20722e..86bbe5a9f 100644 --- a/rel/files/start_erl.cmd +++ b/rel/files/start_erl.cmd @@ -24,7 +24,7 @@ @if exist "%releases_dir%\%release_version%\sys.config" ( @set app_config="%releases_dir%\%release_version%\sys.config" ) else ( - @set app_config="%node_root%\etc\app.config" + @set app_config="%node_root%\etc\emqttd.config" ) @if exist "%releases_dir%\%release_version%\vm.args" ( diff --git a/rel/reltool.config b/rel/reltool.config index 3c1120842..1bdcc911c 100644 --- a/rel/reltool.config +++ b/rel/reltool.config @@ -71,7 +71,7 @@ {copy, "files/install_upgrade.escript", "bin/install_upgrade.escript"}, {copy, "files/ssl/ssl.crt", "etc/ssl.crt"}, {copy, "files/ssl/ssl.key", "etc/ssl.key"}, - {template, "files/app.config", "etc/app.config"}, + {template, "files/emqttd.config", "etc/emqttd.config"}, {template, "files/acl.config", "etc/acl.config"}, {template, "files/clients.config", "etc/clients.config"}, {template, "files/plugins.config", "etc/plugins.config"}, diff --git a/rel/vars.config b/rel/vars.config index 996da47c1..d6a109ba5 100644 --- a/rel/vars.config +++ b/rel/vars.config @@ -9,7 +9,7 @@ {platform_log_dir, "./log"}. %% -%% etc/app.config +%% etc/emqttd.config %%