summaryrefslogtreecommitdiff
path: root/scripts/rabbitmq-env
diff options
context:
space:
mode:
authorMarek Majkowski <marek@rabbitmq.com>2011-02-04 14:03:41 +0000
committerMarek Majkowski <marek@rabbitmq.com>2011-02-04 14:03:41 +0000
commit66c930e09b540ce2a68cfdc642f463a12f68c13e (patch)
treef63d07c07892fa6208b0afb9e0b73eab8a97004c /scripts/rabbitmq-env
parent75a898bd61d287dabc9cbae3ba4bedda8d89ea6e (diff)
parent21e2b0e5c98862504b3a43f739ced2c77691aec3 (diff)
downloadrabbitmq-server-git-66c930e09b540ce2a68cfdc642f463a12f68c13e.tar.gz
default merged into bug23533
Diffstat (limited to 'scripts/rabbitmq-env')
-rwxr-xr-xscripts/rabbitmq-env39
1 files changed, 13 insertions, 26 deletions
diff --git a/scripts/rabbitmq-env b/scripts/rabbitmq-env
index 36734874e7..df4b24d8fc 100755
--- a/scripts/rabbitmq-env
+++ b/scripts/rabbitmq-env
@@ -1,33 +1,18 @@
#!/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/
+## 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.
+## 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 Original Code is RabbitMQ.
##
-## The Initial Developers of the Original Code are LShift Ltd,
-## Cohesive Financial Technologies LLC, and Rabbit Technologies Ltd.
-##
-## Portions created before 22-Nov-2008 00:00:00 GMT by LShift Ltd,
-## Cohesive Financial Technologies LLC, or Rabbit Technologies Ltd
-## are Copyright (C) 2007-2008 LShift Ltd, Cohesive Financial
-## Technologies LLC, and Rabbit Technologies Ltd.
-##
-## Portions created by LShift Ltd are Copyright (C) 2007-2010 LShift
-## Ltd. Portions created by Cohesive Financial Technologies LLC are
-## Copyright (C) 2007-2010 Cohesive Financial Technologies
-## LLC. Portions created by Rabbit Technologies Ltd are Copyright
-## (C) 2007-2010 Rabbit Technologies Ltd.
-##
-## All Rights Reserved.
-##
-## Contributor(s): ______________________________________.
+## The Initial Developer of the Original Code is VMware, Inc.
+## Copyright (c) 2007-2011 VMware, Inc. All rights reserved.
##
# Determine where this script is really located
@@ -48,6 +33,8 @@ done
SCRIPT_DIR=`dirname $SCRIPT_PATH`
RABBITMQ_HOME="${SCRIPT_DIR}/.."
+[ "x" = "x$HOSTNAME" ] && HOSTNAME=`env hostname`
+NODENAME=rabbit@${HOSTNAME%%.*}
# Load configuration from the rabbitmq.conf file
[ -f /etc/rabbitmq/rabbitmq.conf ] && . /etc/rabbitmq/rabbitmq.conf