Explorar o código

rename 'etc/app.config' to 'etc/emqttd.config'

Feng Lee %!s(int64=10) %!d(string=hai) anos
pai
achega
bc11e7a5c4
Modificáronse 6 ficheiros con 20 adicións e 15 borrados
  1. 9 9
      rel/files/emqttd
  2. 5 0
      rel/files/emqttd.config
  3. 3 3
      rel/files/nodetool
  4. 1 1
      rel/files/start_erl.cmd
  5. 1 1
      rel/reltool.config
  6. 1 1
      rel/vars.config

+ 9 - 9
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

+ 5 - 0
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

+ 3 - 3
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]).
 
 

+ 1 - 1
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" (

+ 1 - 1
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"},

+ 1 - 1
rel/vars.config

@@ -9,7 +9,7 @@
 {platform_log_dir,  "./log"}.
 
 %%
-%% etc/app.config
+%% etc/emqttd.config
 %%