Explorar o código

feat: supports user-defined EPMD_ARGS environment variable

Now the user is able to use epmd mode by setting the EPMD_ARGS manually:

```
EPMD_ARGS="-start_epmd=true" _build/emqx-enterprise/rel/emqx/bin/emqx console
```

This is useful when a developer wants to connect a temporary Erlang node to the EMQX node.
For example, the developer may want to enable the observer tool in another Erlang shell to debug a remote EMQX node:

```
erl -name test@127.0.0.1 -setcookie emqxsecretcookie
(test@127.0.0.1)2> observer:start().
```
Shawn hai 1 ano
pai
achega
05f7ade050
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      bin/emqx

+ 1 - 1
bin/emqx

@@ -596,7 +596,7 @@ get_boot_config() {
     echo -e "$EMQX_BOOT_CONFIGS" | $GREP "$path_to_value=" | sed -e "s/$path_to_value=//g" | tr -d \"
 }
 
-EPMD_ARGS="-start_epmd false -epmd_module ekka_epmd -proto_dist ekka"
+EPMD_ARGS="${EPMD_ARGS:-"-start_epmd false -epmd_module ekka_epmd -proto_dist ekka"}"
 PROTO_DIST="$(get_boot_config 'cluster.proto_dist' || true)"
 TICKTIME="$(get_boot_config 'node.dist_net_ticktime' || echo '120')"
 # this environment variable is required by ekka_dist module