diff options
| author | Simon MacMullen <simon@rabbitmq.com> | 2014-06-27 16:19:50 +0100 |
|---|---|---|
| committer | Simon MacMullen <simon@rabbitmq.com> | 2014-06-27 16:19:50 +0100 |
| commit | fabe615f03ce12cdfa7ddf1a8ed0a5eb1c23ce32 (patch) | |
| tree | 8581ea0b1b4cc39c94c75114779e2b07cec4840d /scripts | |
| parent | 32d6e55012f7db98b7a40ee06e943e063ddd49c7 (diff) | |
| parent | 96682191f028615959994aca91b2d0dd73591b95 (diff) | |
| download | rabbitmq-server-git-fabe615f03ce12cdfa7ddf1a8ed0a5eb1c23ce32.tar.gz | |
Merge in stable
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/rabbitmq-defaults | 2 | ||||
| -rwxr-xr-x | scripts/rabbitmq-env | 9 | ||||
| -rwxr-xr-x | scripts/rabbitmq-plugins | 2 | ||||
| -rwxr-xr-x | scripts/rabbitmq-server | 13 | ||||
| -rwxr-xr-x | scripts/rabbitmq-service.bat | 1 | ||||
| -rwxr-xr-x | scripts/rabbitmqctl | 2 |
6 files changed, 21 insertions, 8 deletions
diff --git a/scripts/rabbitmq-defaults b/scripts/rabbitmq-defaults index 1ab819f6ce..1d9afbd8a5 100644 --- a/scripts/rabbitmq-defaults +++ b/scripts/rabbitmq-defaults @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/sh -e ## 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 diff --git a/scripts/rabbitmq-env b/scripts/rabbitmq-env index 861e0b32f5..69d5a9c9d0 100755 --- a/scripts/rabbitmq-env +++ b/scripts/rabbitmq-env @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/sh -e ## 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 @@ -15,10 +15,14 @@ ## Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. ## +# We set +e here since since our test for "readlink -f" below needs to +# be able to fail. +set +e # Determine where this script is really located (if this script is # invoked from another script, this is the location of the caller) SCRIPT_PATH="$0" while [ -h "$SCRIPT_PATH" ] ; do + # Determine if readlink -f is supported at all. TODO clean this up. FULL_PATH=`readlink -f $SCRIPT_PATH 2>/dev/null` if [ "$?" != "0" ]; then REL_PATH=`readlink $SCRIPT_PATH` @@ -31,6 +35,7 @@ while [ -h "$SCRIPT_PATH" ] ; do SCRIPT_PATH=$FULL_PATH fi done +set -e SCRIPT_DIR=`dirname $SCRIPT_PATH` RABBITMQ_HOME="${SCRIPT_DIR}/.." @@ -52,4 +57,4 @@ if [ -f /etc/rabbitmq/rabbitmq.conf ] && \ fi ## Get configuration variables from the configure environment file -[ -f ${CONF_ENV_FILE} ] && . ${CONF_ENV_FILE} +[ -f ${CONF_ENV_FILE} ] && . ${CONF_ENV_FILE} || true diff --git a/scripts/rabbitmq-plugins b/scripts/rabbitmq-plugins index 2ec45be01f..bd7d0b6ab2 100755 --- a/scripts/rabbitmq-plugins +++ b/scripts/rabbitmq-plugins @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/sh -e ## 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 diff --git a/scripts/rabbitmq-server b/scripts/rabbitmq-server index 03cd80e11a..bd397441a9 100755 --- a/scripts/rabbitmq-server +++ b/scripts/rabbitmq-server @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/sh -e ## 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 @@ -87,6 +87,8 @@ esac RABBITMQ_EBIN_ROOT="${RABBITMQ_HOME}/ebin" +set +e + RABBITMQ_CONFIG_FILE=$RABBITMQ_CONFIG_FILE \ RABBITMQ_DIST_PORT=$RABBITMQ_DIST_PORT \ ${ERL_DIR}erl -pa "$RABBITMQ_EBIN_ROOT" \ @@ -98,13 +100,18 @@ RABBITMQ_DIST_PORT=$RABBITMQ_DIST_PORT \ -extra "${RABBITMQ_NODENAME}" PRELAUNCH_RESULT=$? -if [ ${PRELAUNCH_RESULT} = 1 ] ; then - exit 1 +if [ ${PRELAUNCH_RESULT} = 2 ] ; then + # dist port is mentioned in config, so do not set it + true elif [ ${PRELAUNCH_RESULT} = 0 ] ; then # dist port is not mentioned in the config file, we can set it RABBITMQ_DIST_ARG="-kernel inet_dist_listen_min ${RABBITMQ_DIST_PORT} -kernel inet_dist_listen_max ${RABBITMQ_DIST_PORT}" +else + exit ${PRELAUNCH_RESULT} fi +set -e + RABBITMQ_CONFIG_ARG= [ -f "${RABBITMQ_CONFIG_FILE}.config" ] && RABBITMQ_CONFIG_ARG="-config ${RABBITMQ_CONFIG_FILE}" diff --git a/scripts/rabbitmq-service.bat b/scripts/rabbitmq-service.bat index 7040209753..895561d4be 100755 --- a/scripts/rabbitmq-service.bat +++ b/scripts/rabbitmq-service.bat @@ -229,6 +229,7 @@ set ERLANG_SERVICE_ARGUMENTS= ^ -rabbit enabled_plugins_file \""!RABBITMQ_ENABLED_PLUGINS_FILE:\=/!"\" ^
-rabbit plugins_dir \""!RABBITMQ_PLUGINS_DIR:\=/!"\" ^
-rabbit plugins_expand_dir \""!RABBITMQ_PLUGINS_EXPAND_DIR:\=/!"\" ^
+-rabbit windows_service_config \""!RABBITMQ_CONFIG_FILE:\=/!"\" ^
-os_mon start_cpu_sup false ^
-os_mon start_disksup false ^
-os_mon start_memsup false ^
diff --git a/scripts/rabbitmqctl b/scripts/rabbitmqctl index ff9cb7fa50..309abf2a0d 100755 --- a/scripts/rabbitmqctl +++ b/scripts/rabbitmqctl @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/sh -e ## 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 |
