feat: bin/emqx pass down DEBUG if su exec
This commit is contained in:
parent
ade69c1e18
commit
562ce1a81b
5
bin/emqx
5
bin/emqx
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue