Before this change, if a license in `emqx.conf` was of type
`key`/`file` and then changed to the opposite type, such change would
be saved to `{cluster,local}-overrides.conf`. When the node restarts
after that, the configs are merged naively and becomes invalid, as it
contains both the `key` and `file` keys, and crashes.
prior to this cahnge emqx node shutdown is done by init:stop
which might have undesired stop order of the applications
in this change, emqx_machine_terminator is added to stop apps
in defined order and then terminate the node in infinite loop
nodetool has all lib paths set up correctly by reading the
persisted RELEASES file
calling hocon escript directly has two problems:
1. it may not be able to find the beams compiled
2. if we use ERL_LIBS, it may find the version after hot beam upgrade
Prioro to this change, ekka lib dir was added by inspecting
the ekka lib version in persisted RELEASES file.
However, this file may not be the true version if a hot
upgrade failed in the middle.
In this fix, it reads the per-version emqx.rel file
content to load lib paths.