fix: add the 'die' function in bin/emqx
This commit is contained in:
parent
ccb51265b8
commit
6a0d2c9d46
7
bin/emqx
7
bin/emqx
|
@ -36,6 +36,13 @@ ERTS_LIB_DIR="$ERTS_DIR/../lib"
|
||||||
# Echo to stderr on errors
|
# Echo to stderr on errors
|
||||||
echoerr() { echo "$*" 1>&2; }
|
echoerr() { echo "$*" 1>&2; }
|
||||||
|
|
||||||
|
die() {
|
||||||
|
set +x
|
||||||
|
echoerr "ERROR: $1"
|
||||||
|
errno=${2:-1}
|
||||||
|
exit "$errno"
|
||||||
|
}
|
||||||
|
|
||||||
assert_node_alive() {
|
assert_node_alive() {
|
||||||
if ! relx_nodetool "ping" > /dev/null; then
|
if ! relx_nodetool "ping" > /dev/null; then
|
||||||
die "node_is_not_running!" 1
|
die "node_is_not_running!" 1
|
||||||
|
|
Loading…
Reference in New Issue