Merge pull request #8689 from zmstone/0811-fix-missing-function-in-bin-emqx

fix: add the 'die' function in bin/emqx
This commit is contained in:
Zaiming (Stone) Shi 2022-08-11 08:41:50 +01:00 committed by GitHub
commit 0a6a01463e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 0 deletions

View File

@ -36,6 +36,13 @@ ERTS_LIB_DIR="$ERTS_DIR/../lib"
# Echo to stderr on errors
echoerr() { echo "$*" 1>&2; }
die() {
set +x
echoerr "ERROR: $1"
errno=${2:-1}
exit "$errno"
}
assert_node_alive() {
if ! relx_nodetool "ping" > /dev/null; then
die "node_is_not_running!" 1