2017-01-18 02:03:18 +08:00
|
|
|
#!/bin/sh
|
2020-07-10 21:31:17 +08:00
|
|
|
## This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
## License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
## file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
2017-01-18 02:03:18 +08:00
|
|
|
##
|
2024-02-06 00:53:36 +08:00
|
|
|
## Copyright (c) 2007-2025 Broadcom. All Rights Reserved. The term “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. All rights reserved.
|
2017-01-18 02:03:18 +08:00
|
|
|
##
|
2016-10-26 00:29:12 +08:00
|
|
|
|
2017-01-18 02:03:18 +08:00
|
|
|
# Exit immediately if a pipeline, which may consist of a single simple command,
|
|
|
|
# a list, or a compound command returns a non-zero status
|
|
|
|
set -e
|
|
|
|
|
|
|
|
# Each variable or function that is created or modified is given the export
|
|
|
|
# attribute and marked for export to the environment of subsequent commands.
|
2016-10-27 21:49:02 +08:00
|
|
|
set -a
|
|
|
|
|
2017-01-18 02:03:18 +08:00
|
|
|
# shellcheck source=/dev/null
|
|
|
|
#
|
|
|
|
# TODO: when shellcheck adds support for relative paths, change to
|
|
|
|
# shellcheck source=./rabbitmq-env
|
|
|
|
. "${0%/*}"/rabbitmq-env
|
2016-10-27 21:49:02 +08:00
|
|
|
|
2023-12-30 12:55:17 +08:00
|
|
|
maybe_noinput='noinput'
|
|
|
|
|
2024-04-23 14:56:10 +08:00
|
|
|
case "$@" in
|
|
|
|
*observer*)
|
2024-01-02 23:59:31 +08:00
|
|
|
maybe_noinput='input'
|
|
|
|
;;
|
2024-04-23 14:56:10 +08:00
|
|
|
*remote_shell*)
|
2024-01-02 23:59:31 +08:00
|
|
|
maybe_noinput='input'
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
maybe_noinput='noinput'
|
|
|
|
;;
|
|
|
|
esac
|
2023-12-30 12:55:17 +08:00
|
|
|
|
|
|
|
run_escript "${ESCRIPT_DIR:?must be defined}"/rabbitmq-diagnostics "$maybe_noinput" "$@"
|