feat: bin/emqx pass down DEBUG if su exec

This commit is contained in:
Zaiming Shi 2021-08-04 17:38:01 +02:00
parent ade69c1e18
commit 562ce1a81b
1 changed files with 3 additions and 2 deletions

View File

@ -5,7 +5,8 @@
set -e set -e
set -o pipefail set -o pipefail
if [ -n "$DEBUG" ]; then DEBUG="${DEBUG:-0}"
if [ "$DEBUG" -eq 1 ]; then
set -x set -x
fi fi
@ -113,7 +114,7 @@ check_user() {
echo "You need to be root or use sudo to run this command" echo "You need to be root or use sudo to run this command"
exit 1 exit 1
fi fi
CMD="\"$RUNNER_SCRIPT\" " CMD="DEBUG=$DEBUG \"$RUNNER_SCRIPT\" "
for ARG in "$@"; do for ARG in "$@"; do
CMD="${CMD} \"$ARG\"" CMD="${CMD} \"$ARG\""
done done