summaryrefslogtreecommitdiff
path: root/scripts/rabbitmqctl
diff options
context:
space:
mode:
authorMichael Klishin <mklishin@pivotal.io>2017-01-20 20:29:00 +0300
committerMichael Klishin <mklishin@pivotal.io>2017-01-20 20:29:00 +0300
commitee27e6650ac243125a9be080a71446e40ec4af8e (patch)
tree6ae100671ad7bd30cea90629d749c425470262cd /scripts/rabbitmqctl
parentcfe9829874149d431428217947d97f9c2d2c84a7 (diff)
parent66a44fa157f2ab3f68e9894f13a0f4eb4ff71b80 (diff)
downloadrabbitmq-server-git-ee27e6650ac243125a9be080a71446e40ec4af8e.tar.gz
Merge branch 'master' into rabbitmq-event-exchange-10
Diffstat (limited to 'scripts/rabbitmqctl')
-rwxr-xr-xscripts/rabbitmqctl31
1 files changed, 28 insertions, 3 deletions
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 "$@"