summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/rabbitmq-diagnostics31
-rwxr-xr-xscripts/rabbitmq-plugins31
-rwxr-xr-xscripts/rabbitmqctl31
3 files changed, 84 insertions, 9 deletions
diff --git a/scripts/rabbitmq-diagnostics b/scripts/rabbitmq-diagnostics
index 40e9ec0177..49d38304ef 100755
--- a/scripts/rabbitmq-diagnostics
+++ b/scripts/rabbitmq-diagnostics
@@ -1,7 +1,32 @@
-#!/usr/bin/env bash
+#!/bin/sh
+## The contents of this file are subject to the Mozilla Public License
+## Version 1.1 (the "License"); you may not use this file except in
+## compliance with the License. You may obtain a copy of the License
+## at http://www.mozilla.org/MPL/
+##
+## Software distributed under the License is distributed on an "AS IS"
+## basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+## the License for the specific language governing rights and
+## limitations under the License.
+##
+## The Original Code is RabbitMQ.
+##
+## The Initial Developer of the Original Code is GoPivotal, Inc.
+## Copyright (c) 2007-2017 Pivotal Software, Inc. All rights reserved.
+##
+# 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.
set -a
-. `dirname $0`/rabbitmq-env
+# shellcheck source=/dev/null
+#
+# TODO: when shellcheck adds support for relative paths, change to
+# shellcheck source=./rabbitmq-env
+. "${0%/*}"/rabbitmq-env
-escript $ESCRIPT_DIR/rabbitmq-diagnostics "$@" \ No newline at end of file
+escript "${ESCRIPT_DIR:?must be defined}"/rabbitmq-diagnostics "$@"
diff --git a/scripts/rabbitmq-plugins b/scripts/rabbitmq-plugins
index c9b6408ea0..c5cd46e9b4 100755
--- a/scripts/rabbitmq-plugins
+++ b/scripts/rabbitmq-plugins
@@ -1,7 +1,32 @@
-#!/usr/bin/env bash
+#!/bin/sh
+## The contents of this file are subject to the Mozilla Public License
+## Version 1.1 (the "License"); you may not use this file except in
+## compliance with the License. You may obtain a copy of the License
+## at http://www.mozilla.org/MPL/
+##
+## Software distributed under the License is distributed on an "AS IS"
+## basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+## the License for the specific language governing rights and
+## limitations under the License.
+##
+## The Original Code is RabbitMQ.
+##
+## The Initial Developer of the Original Code is GoPivotal, Inc.
+## Copyright (c) 2007-2017 Pivotal Software, Inc. All rights reserved.
+##
+# 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.
set -a
-. `dirname $0`/rabbitmq-env
+# shellcheck source=/dev/null
+#
+# TODO: when shellcheck adds support for relative paths, change to
+# shellcheck source=./rabbitmq-env
+. "${0%/*}"/rabbitmq-env
-escript $ESCRIPT_DIR/rabbitmq-plugins --formatter=plugins -q "$@" \ No newline at end of file
+escript "${ESCRIPT_DIR:?must be defined}"/rabbitmq-plugins --formatter=plugins -q "$@"
diff --git a/scripts/rabbitmqctl b/scripts/rabbitmqctl
index 048062b00d..49519c7025 100755
--- a/scripts/rabbitmqctl
+++ b/scripts/rabbitmqctl
@@ -1,7 +1,32 @@
-#!/usr/bin/env bash
+#!/bin/sh
+## The contents of this file are subject to the Mozilla Public License
+## Version 1.1 (the "License"); you may not use this file except in
+## compliance with the License. You may obtain a copy of the License
+## at http://www.mozilla.org/MPL/
+##
+## Software distributed under the License is distributed on an "AS IS"
+## basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+## the License for the specific language governing rights and
+## limitations under the License.
+##
+## The Original Code is RabbitMQ.
+##
+## The Initial Developer of the Original Code is GoPivotal, Inc.
+## Copyright (c) 2007-2017 Pivotal Software, Inc. All rights reserved.
+##
+# 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.
set -a
-. `dirname $0`/rabbitmq-env
+# shellcheck source=/dev/null
+#
+# TODO: when shellcheck adds support for relative paths, change to
+# shellcheck source=./rabbitmq-env
+. "${0%/*}"/rabbitmq-env
-escript $ESCRIPT_DIR/rabbitmqctl "$@"
+escript "${ESCRIPT_DIR:?must be defined}"/rabbitmqctl "$@"