From eb0488828b77fd96e163385b203deadaa6c82756 Mon Sep 17 00:00:00 2001 From: k32 <10274441+k32@users.noreply.github.com> Date: Thu, 6 May 2021 12:34:09 +0200 Subject: [PATCH] fix(node_dump): Remove bashisms from node_dump script --- bin/node_dump | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/bin/node_dump b/bin/node_dump index 7b1078c9f..056b9a822 100755 --- a/bin/node_dump +++ b/bin/node_dump @@ -1,6 +1,5 @@ -#!/bin/bash -set -euo pipefail -shopt -s nullglob +#!/bin/sh +set -eu ROOT_DIR="$(cd "$(dirname "$(readlink "$0" || echo "$0")")"/..; pwd -P)" @@ -19,7 +18,7 @@ collect() { echo " $*" echo "========================================================" eval "$*" || echo "Unavailable" - echo -e '\n' + echo } show_help() { @@ -36,7 +35,7 @@ OPTIONS: } while getopts "a:h" opt; do - case "${opt}" in + case "${opt}" in a) LOG_MAX_AGE_DAYS="${OPTARG}" ;; h) show_help ;; *) ;; @@ -50,7 +49,7 @@ done collect uname -a collect uptime - collect free -h + collect free collect netstat -tnl collect bin/emqx_ctl plugins list @@ -77,6 +76,7 @@ rm "${SYSINFO}" #rm "${CONF_DUMP}" # Keep it for inspection echo "Created a node dump ${DUMP}" -echo -e "\nWARNING: this script tries to obfuscate secrets, but make sure to +echo +echo "WARNING: this script tries to obfuscate secrets, but make sure to inspect log/conf.dump file manually before uploading the node dump to a public location."