diff options
author | Jean-Sebastien Pedron <jean-sebastien@rabbitmq.com> | 2014-12-03 15:27:45 +0100 |
---|---|---|
committer | Jean-Sebastien Pedron <jean-sebastien@rabbitmq.com> | 2014-12-03 15:27:45 +0100 |
commit | b4cfde3f0930f953bb8da3a4e70c37740ce9c75d (patch) | |
tree | 4b825dc642cb6eb9a060e54bf8d69288fbee4904 /scripts | |
parent | 008476172f305e1e6b12f9e2701a39e0b9f06ecf (diff) | |
parent | 2b4eddb2a587f1555ec1ec835e7304fd430bba29 (diff) | |
download | rabbitmq-server-junk.tar.gz |
Junked bug26446junk
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/rabbitmq-defaults | 36 | ||||
-rw-r--r-- | scripts/rabbitmq-echopid.bat | 59 | ||||
-rwxr-xr-x | scripts/rabbitmq-env | 113 | ||||
-rwxr-xr-x | scripts/rabbitmq-plugins | 32 | ||||
-rwxr-xr-x | scripts/rabbitmq-plugins.bat | 69 | ||||
-rwxr-xr-x | scripts/rabbitmq-server | 108 | ||||
-rwxr-xr-x | scripts/rabbitmq-server.bat | 175 | ||||
-rwxr-xr-x | scripts/rabbitmq-service.bat | 275 | ||||
-rwxr-xr-x | scripts/rabbitmqctl | 41 | ||||
-rwxr-xr-x | scripts/rabbitmqctl.bat | 82 |
10 files changed, 0 insertions, 990 deletions
diff --git a/scripts/rabbitmq-defaults b/scripts/rabbitmq-defaults deleted file mode 100644 index 1d9afbd8..00000000 --- a/scripts/rabbitmq-defaults +++ /dev/null @@ -1,36 +0,0 @@ -#!/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 -## 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) 2012-2014 GoPivotal, Inc. All rights reserved. -## - -### next line potentially updated in package install steps -SYS_PREFIX= - -### next line will be updated when generating a standalone release -ERL_DIR= - -CLEAN_BOOT_FILE=start_clean -SASL_BOOT_FILE=start_sasl - -## Set default values - -CONFIG_FILE=${SYS_PREFIX}/etc/rabbitmq/rabbitmq -LOG_BASE=${SYS_PREFIX}/var/log/rabbitmq -MNESIA_BASE=${SYS_PREFIX}/var/lib/rabbitmq/mnesia -ENABLED_PLUGINS_FILE=${SYS_PREFIX}/etc/rabbitmq/enabled_plugins - -PLUGINS_DIR="${RABBITMQ_HOME}/plugins" - -CONF_ENV_FILE=${SYS_PREFIX}/etc/rabbitmq/rabbitmq-env.conf diff --git a/scripts/rabbitmq-echopid.bat b/scripts/rabbitmq-echopid.bat deleted file mode 100644 index 2d3a6fa4..00000000 --- a/scripts/rabbitmq-echopid.bat +++ /dev/null @@ -1,59 +0,0 @@ -@echo off - -REM Usage: rabbitmq-echopid.bat <rabbitmq_nodename> -REM -REM <rabbitmq_nodename> (s)name of the erlang node to connect to (required) - -setlocal - -if "%1"=="" goto fail - -:: set timeout vars :: -set TIMEOUT=10 -set TIMER=1 - -:: check that wmic exists :: -set WMIC_PATH=%SYSTEMROOT%\System32\Wbem\wmic.exe -if not exist "%WMIC_PATH%" ( - goto fail -) - -:: sets sname/name :: -if "!RABBITMQ_USE_LONGNAME!"=="" ( - set RABBITMQ_NAME_TYPE="-sname" -) - -if "!RABBITMQ_USE_LONGNAME!"=="true" ( - set RABBITMQ_NAME_TYPE="-name" -) - - -:getpid -for /f "usebackq tokens=* skip=1" %%P IN (`%%WMIC_PATH%% process where "name='erl.exe' and commandline like '%%%RABBITMQ_NAME_TYPE% %1%%'" get processid 2^>nul`) do ( - set PID=%%P - goto echopid -) - -:echopid -:: check for pid not found :: -if "%PID%" == "" ( - PING 127.0.0.1 -n 2 > nul - set /a TIMER+=1 - if %TIMEOUT%==%TIMER% goto fail - goto getpid -) - -:: show pid :: -echo %PID% - -:: all done :: -:ok -endlocal -EXIT /B 0 - -:: something went wrong :: -:fail -endlocal -EXIT /B 1 - - diff --git a/scripts/rabbitmq-env b/scripts/rabbitmq-env deleted file mode 100755 index 63cfda3c..00000000 --- a/scripts/rabbitmq-env +++ /dev/null @@ -1,113 +0,0 @@ -#!/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 -## 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-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` - if expr "$REL_PATH" : '/.*' > /dev/null; then - SCRIPT_PATH="$REL_PATH" - else - SCRIPT_PATH="`dirname "$SCRIPT_PATH"`/$REL_PATH" - fi - else - SCRIPT_PATH=$FULL_PATH - fi -done -set -e - -SCRIPT_DIR=`dirname $SCRIPT_PATH` -RABBITMQ_HOME="${SCRIPT_DIR}/.." - -## Set defaults -. ${SCRIPT_DIR}/rabbitmq-defaults - -## Common defaults -SERVER_ERL_ARGS="+K true +A30 +P 1048576 \ - -kernel inet_default_connect_options [{nodelay,true}]" - -# warn about old rabbitmq.conf file, if no new one -if [ -f /etc/rabbitmq/rabbitmq.conf ] && \ - [ ! -f ${CONF_ENV_FILE} ] ; then - echo -n "WARNING: ignoring /etc/rabbitmq/rabbitmq.conf -- " - echo "location has moved to ${CONF_ENV_FILE}" -fi - -## Get configuration variables from the configure environment file -[ -f ${CONF_ENV_FILE} ] && . ${CONF_ENV_FILE} || true - -[ "x" = "x$RABBITMQ_USE_LONGNAME" ] && RABBITMQ_USE_LONGNAME=${USE_LONGNAME} -if [ "xtrue" = "x$RABBITMQ_USE_LONGNAME" ] ; then - RABBITMQ_NAME_TYPE=-name - [ "x" = "x$HOSTNAME" ] && HOSTNAME=`env hostname --fqdn` - [ "x" = "x$NODENAME" ] && NODENAME=rabbit@${HOSTNAME} -else - RABBITMQ_NAME_TYPE=-sname - [ "x" = "x$HOSTNAME" ] && HOSTNAME=`env hostname` - [ "x" = "x$NODENAME" ] && NODENAME=rabbit@${HOSTNAME%%.*} -fi - -##--- Set environment vars RABBITMQ_<var_name> to defaults if not set - -DEFAULT_NODE_IP_ADDRESS=auto -DEFAULT_NODE_PORT=5672 -[ "x" = "x$RABBITMQ_NODE_IP_ADDRESS" ] && RABBITMQ_NODE_IP_ADDRESS=${NODE_IP_ADDRESS} -[ "x" = "x$RABBITMQ_NODE_PORT" ] && RABBITMQ_NODE_PORT=${NODE_PORT} - -[ "x" = "x$RABBITMQ_NODE_IP_ADDRESS" ] && [ "x" != "x$RABBITMQ_NODE_PORT" ] && RABBITMQ_NODE_IP_ADDRESS=${DEFAULT_NODE_IP_ADDRESS} -[ "x" != "x$RABBITMQ_NODE_IP_ADDRESS" ] && [ "x" = "x$RABBITMQ_NODE_PORT" ] && RABBITMQ_NODE_PORT=${DEFAULT_NODE_PORT} - -[ "x" = "x$RABBITMQ_DIST_PORT" ] && RABBITMQ_DIST_PORT=${DIST_PORT} -[ "x" = "x$RABBITMQ_DIST_PORT" ] && [ "x" = "x$RABBITMQ_NODE_PORT" ] && RABBITMQ_DIST_PORT=$((${DEFAULT_NODE_PORT} + 20000)) -[ "x" = "x$RABBITMQ_DIST_PORT" ] && [ "x" != "x$RABBITMQ_NODE_PORT" ] && RABBITMQ_DIST_PORT=$((${RABBITMQ_NODE_PORT} + 20000)) - -[ "x" = "x$RABBITMQ_NODENAME" ] && RABBITMQ_NODENAME=${NODENAME} -[ "x" = "x$RABBITMQ_SERVER_ERL_ARGS" ] && RABBITMQ_SERVER_ERL_ARGS=${SERVER_ERL_ARGS} -[ "x" = "x$RABBITMQ_CONFIG_FILE" ] && RABBITMQ_CONFIG_FILE=${CONFIG_FILE} -[ "x" = "x$RABBITMQ_LOG_BASE" ] && RABBITMQ_LOG_BASE=${LOG_BASE} -[ "x" = "x$RABBITMQ_MNESIA_BASE" ] && RABBITMQ_MNESIA_BASE=${MNESIA_BASE} -[ "x" = "x$RABBITMQ_SERVER_START_ARGS" ] && RABBITMQ_SERVER_START_ARGS=${SERVER_START_ARGS} -[ "x" = "x$RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS" ] && RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS=${SERVER_ADDITIONAL_ERL_ARGS} -[ "x" = "x$RABBITMQ_MNESIA_DIR" ] && RABBITMQ_MNESIA_DIR=${MNESIA_DIR} -[ "x" = "x$RABBITMQ_MNESIA_DIR" ] && RABBITMQ_MNESIA_DIR=${RABBITMQ_MNESIA_BASE}/${RABBITMQ_NODENAME} - -[ "x" = "x$RABBITMQ_PID_FILE" ] && RABBITMQ_PID_FILE=${PID_FILE} -[ "x" = "x$RABBITMQ_PID_FILE" ] && RABBITMQ_PID_FILE=${RABBITMQ_MNESIA_DIR}.pid - -[ "x" = "x$RABBITMQ_PLUGINS_EXPAND_DIR" ] && RABBITMQ_PLUGINS_EXPAND_DIR=${PLUGINS_EXPAND_DIR} -[ "x" = "x$RABBITMQ_PLUGINS_EXPAND_DIR" ] && RABBITMQ_PLUGINS_EXPAND_DIR=${RABBITMQ_MNESIA_BASE}/${RABBITMQ_NODENAME}-plugins-expand - -[ "x" = "x$RABBITMQ_ENABLED_PLUGINS_FILE" ] && RABBITMQ_ENABLED_PLUGINS_FILE=${ENABLED_PLUGINS_FILE} - -[ "x" = "x$RABBITMQ_PLUGINS_DIR" ] && RABBITMQ_PLUGINS_DIR=${PLUGINS_DIR} - -## Log rotation -[ "x" = "x$RABBITMQ_LOGS" ] && RABBITMQ_LOGS=${LOGS} -[ "x" = "x$RABBITMQ_LOGS" ] && RABBITMQ_LOGS="${RABBITMQ_LOG_BASE}/${RABBITMQ_NODENAME}.log" -[ "x" = "x$RABBITMQ_SASL_LOGS" ] && RABBITMQ_SASL_LOGS=${SASL_LOGS} -[ "x" = "x$RABBITMQ_SASL_LOGS" ] && RABBITMQ_SASL_LOGS="${RABBITMQ_LOG_BASE}/${RABBITMQ_NODENAME}-sasl.log" - -[ "x" = "x$RABBITMQ_CTL_ERL_ARGS" ] && RABBITMQ_CTL_ERL_ARGS=${CTL_ERL_ARGS} - -##--- End of overridden <var_name> variables diff --git a/scripts/rabbitmq-plugins b/scripts/rabbitmq-plugins deleted file mode 100755 index 29c4b0c8..00000000 --- a/scripts/rabbitmq-plugins +++ /dev/null @@ -1,32 +0,0 @@ -#!/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 -## 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-2014 GoPivotal, Inc. All rights reserved. -## - -# Get default settings with user overrides for (RABBITMQ_)<var_name> -# Non-empty defaults should be set in rabbitmq-env -. `dirname $0`/rabbitmq-env - -exec ${ERL_DIR}erl \ - -pa "${RABBITMQ_HOME}/ebin" \ - -noinput \ - -hidden \ - ${RABBITMQ_NAME_TYPE} rabbitmq-plugins$$ \ - -boot "${CLEAN_BOOT_FILE}" \ - -s rabbit_plugins_main \ - -enabled_plugins_file "$RABBITMQ_ENABLED_PLUGINS_FILE" \ - -plugins_dist_dir "$RABBITMQ_PLUGINS_DIR" \ - -nodename $RABBITMQ_NODENAME \ - -extra "$@" diff --git a/scripts/rabbitmq-plugins.bat b/scripts/rabbitmq-plugins.bat deleted file mode 100755 index 1ed648b0..00000000 --- a/scripts/rabbitmq-plugins.bat +++ /dev/null @@ -1,69 +0,0 @@ -@echo off
-REM The contents of this file are subject to the Mozilla Public License
-REM Version 1.1 (the "License"); you may not use this file except in
-REM compliance with the License. You may obtain a copy of the License
-REM at http://www.mozilla.org/MPL/
-REM
-REM Software distributed under the License is distributed on an "AS IS"
-REM basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-REM the License for the specific language governing rights and
-REM limitations under the License.
-REM
-REM The Original Code is RabbitMQ.
-REM
-REM The Initial Developer of the Original Code is GoPivotal, Inc.
-REM Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved.
-REM
-
-setlocal
-
-rem Preserve values that might contain exclamation marks before
-rem enabling delayed expansion
-set TDP0=%~dp0
-set STAR=%*
-setlocal enabledelayedexpansion
-
-if "!RABBITMQ_USE_LONGNAME!"=="" (
- set RABBITMQ_NAME_TYPE="-sname"
-)
-
-if "!RABBITMQ_USE_LONGNAME!"=="true" (
- set RABBITMQ_NAME_TYPE="-name"
-)
-
-if "!RABBITMQ_SERVICENAME!"=="" (
- set RABBITMQ_SERVICENAME=RabbitMQ
-)
-
-if "!RABBITMQ_BASE!"=="" (
- set RABBITMQ_BASE=!APPDATA!\!RABBITMQ_SERVICENAME!
-)
-
-if "!RABBITMQ_NODENAME!"=="" (
- set RABBITMQ_NODENAME=rabbit@!COMPUTERNAME!
-)
-
-if not exist "!ERLANG_HOME!\bin\erl.exe" (
- echo.
- echo ******************************
- echo ERLANG_HOME not set correctly.
- echo ******************************
- echo.
- echo Please either set ERLANG_HOME to point to your Erlang installation or place the
- echo RabbitMQ server distribution in the Erlang lib folder.
- echo.
- exit /B
-)
-
-if "!RABBITMQ_ENABLED_PLUGINS_FILE!"=="" (
- set RABBITMQ_ENABLED_PLUGINS_FILE=!RABBITMQ_BASE!\enabled_plugins
-)
-
-if "!RABBITMQ_PLUGINS_DIR!"=="" (
- set RABBITMQ_PLUGINS_DIR=!TDP0!..\plugins
-)
-
-"!ERLANG_HOME!\bin\erl.exe" -pa "!TDP0!..\ebin" -noinput -hidden !RABBITMQ_NAME_TYPE! rabbitmq-plugins!RANDOM!!TIME:~9! -s rabbit_plugins_main -enabled_plugins_file "!RABBITMQ_ENABLED_PLUGINS_FILE!" -plugins_dist_dir "!RABBITMQ_PLUGINS_DIR:\=/!" -nodename !RABBITMQ_NODENAME! -extra !STAR!
-
-endlocal
-endlocal
diff --git a/scripts/rabbitmq-server b/scripts/rabbitmq-server deleted file mode 100755 index aea8bfc9..00000000 --- a/scripts/rabbitmq-server +++ /dev/null @@ -1,108 +0,0 @@ -#!/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 -## 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-2014 GoPivotal, Inc. All rights reserved. -## - -# Get default settings with user overrides for (RABBITMQ_)<var_name> -# Non-empty defaults should be set in rabbitmq-env -. `dirname $0`/rabbitmq-env - -RABBITMQ_START_RABBIT= -[ "x" = "x$RABBITMQ_ALLOW_INPUT" ] && RABBITMQ_START_RABBIT=" -noinput" -[ "x" = "x$RABBITMQ_NODE_ONLY" ] && RABBITMQ_START_RABBIT="$RABBITMQ_START_RABBIT -s rabbit boot " - -case "$(uname -s)" in - CYGWIN*) # we make no attempt to record the cygwin pid; rabbitmqctl wait - # will not be able to make sense of it anyway - ;; - *) # When -detached is passed, we don't write the pid, since it'd be the - # wrong one - detached="" - for opt in "$@"; do - if [ "$opt" = "-detached" ]; then - detached="true" - fi - done - if [ $detached ]; then - echo "Warning: PID file not written; -detached was passed." 1>&2 - else - mkdir -p $(dirname ${RABBITMQ_PID_FILE}); - echo $$ > ${RABBITMQ_PID_FILE} - fi -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" \ - -boot "${CLEAN_BOOT_FILE}" \ - -noinput \ - -hidden \ - -s rabbit_prelaunch \ - ${RABBITMQ_NAME_TYPE} rabbitmqprelaunch$$ \ - -extra "${RABBITMQ_NODENAME}" - -PRELAUNCH_RESULT=$? -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}" - -RABBITMQ_LISTEN_ARG= -[ "x" != "x$RABBITMQ_NODE_PORT" ] && [ "x" != "x$RABBITMQ_NODE_IP_ADDRESS" ] && RABBITMQ_LISTEN_ARG="-rabbit tcp_listeners [{\""${RABBITMQ_NODE_IP_ADDRESS}"\","${RABBITMQ_NODE_PORT}"}]" - -# we need to turn off path expansion because some of the vars, notably -# RABBITMQ_SERVER_ERL_ARGS, contain terms that look like globs and -# there is no other way of preventing their expansion. -set -f - -RABBITMQ_CONFIG_FILE=$RABBITMQ_CONFIG_FILE \ -exec ${ERL_DIR}erl \ - -pa ${RABBITMQ_EBIN_ROOT} \ - ${RABBITMQ_START_RABBIT} \ - ${RABBITMQ_NAME_TYPE} ${RABBITMQ_NODENAME} \ - -boot "${SASL_BOOT_FILE}" \ - ${RABBITMQ_CONFIG_ARG} \ - +W w \ - ${RABBITMQ_SERVER_ERL_ARGS} \ - ${RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS} \ - ${RABBITMQ_LISTEN_ARG} \ - -sasl errlog_type error \ - -sasl sasl_error_logger false \ - -rabbit error_logger '{file,"'${RABBITMQ_LOGS}'"}' \ - -rabbit sasl_error_logger '{file,"'${RABBITMQ_SASL_LOGS}'"}' \ - -rabbit enabled_plugins_file "\"$RABBITMQ_ENABLED_PLUGINS_FILE\"" \ - -rabbit plugins_dir "\"$RABBITMQ_PLUGINS_DIR\"" \ - -rabbit plugins_expand_dir "\"$RABBITMQ_PLUGINS_EXPAND_DIR\"" \ - -os_mon start_cpu_sup false \ - -os_mon start_disksup false \ - -os_mon start_memsup false \ - -mnesia dir "\"${RABBITMQ_MNESIA_DIR}\"" \ - ${RABBITMQ_SERVER_START_ARGS} \ - ${RABBITMQ_DIST_ARG} \ - "$@" diff --git a/scripts/rabbitmq-server.bat b/scripts/rabbitmq-server.bat deleted file mode 100755 index 4fdb73b7..00000000 --- a/scripts/rabbitmq-server.bat +++ /dev/null @@ -1,175 +0,0 @@ -@echo off
-REM The contents of this file are subject to the Mozilla Public License
-REM Version 1.1 (the "License"); you may not use this file except in
-REM compliance with the License. You may obtain a copy of the License
-REM at http://www.mozilla.org/MPL/
-REM
-REM Software distributed under the License is distributed on an "AS IS"
-REM basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-REM the License for the specific language governing rights and
-REM limitations under the License.
-REM
-REM The Original Code is RabbitMQ.
-REM
-REM The Initial Developer of the Original Code is GoPivotal, Inc.
-REM Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved.
-REM
-
-setlocal
-
-rem Preserve values that might contain exclamation marks before
-rem enabling delayed expansion
-set TDP0=%~dp0
-set STAR=%*
-setlocal enabledelayedexpansion
-
-if "!RABBITMQ_USE_LONGNAME!"=="" (
- set RABBITMQ_NAME_TYPE="-sname"
-)
-
-if "!RABBITMQ_USE_LONGNAME!"=="true" (
- set RABBITMQ_NAME_TYPE="-name"
-)
-
-if "!RABBITMQ_BASE!"=="" (
- set RABBITMQ_BASE=!APPDATA!\RabbitMQ
-)
-
-if "!COMPUTERNAME!"=="" (
- set COMPUTERNAME=localhost
-)
-
-if "!RABBITMQ_NODENAME!"=="" (
- set RABBITMQ_NODENAME=rabbit@!COMPUTERNAME!
-)
-
-if "!RABBITMQ_NODE_IP_ADDRESS!"=="" (
- if not "!RABBITMQ_NODE_PORT!"=="" (
- set RABBITMQ_NODE_IP_ADDRESS=auto
- )
-) else (
- if "!RABBITMQ_NODE_PORT!"=="" (
- set RABBITMQ_NODE_PORT=5672
- )
-)
-
-if "!RABBITMQ_DIST_PORT!"=="" (
- if "!RABBITMQ_NODE_PORT!"=="" (
- set RABBITMQ_DIST_PORT=25672
- ) else (
- set /a RABBITMQ_DIST_PORT=20000+!RABBITMQ_NODE_PORT!
- )
-)
-
-if not exist "!ERLANG_HOME!\bin\erl.exe" (
- echo.
- echo ******************************
- echo ERLANG_HOME not set correctly.
- echo ******************************
- echo.
- echo Please either set ERLANG_HOME to point to your Erlang installation or place the
- echo RabbitMQ server distribution in the Erlang lib folder.
- echo.
- exit /B
-)
-
-if "!RABBITMQ_MNESIA_BASE!"=="" (
- set RABBITMQ_MNESIA_BASE=!RABBITMQ_BASE!/db
-)
-if "!RABBITMQ_LOG_BASE!"=="" (
- set RABBITMQ_LOG_BASE=!RABBITMQ_BASE!/log
-)
-
-
-rem We save the previous logs in their respective backup
-rem Log management (rotation, filtering based of size...) is left as an exercice for the user.
-
-set LOGS=!RABBITMQ_LOG_BASE!\!RABBITMQ_NODENAME!.log
-set SASL_LOGS=!RABBITMQ_LOG_BASE!\!RABBITMQ_NODENAME!-sasl.log
-
-rem End of log management
-
-
-if "!RABBITMQ_MNESIA_DIR!"=="" (
- set RABBITMQ_MNESIA_DIR=!RABBITMQ_MNESIA_BASE!/!RABBITMQ_NODENAME!-mnesia
-)
-
-if "!RABBITMQ_PLUGINS_EXPAND_DIR!"=="" (
- set RABBITMQ_PLUGINS_EXPAND_DIR=!RABBITMQ_MNESIA_BASE!/!RABBITMQ_NODENAME!-plugins-expand
-)
-
-if "!RABBITMQ_ENABLED_PLUGINS_FILE!"=="" (
- set RABBITMQ_ENABLED_PLUGINS_FILE=!RABBITMQ_BASE!\enabled_plugins
-)
-
-if "!RABBITMQ_PLUGINS_DIR!"=="" (
- set RABBITMQ_PLUGINS_DIR=!TDP0!..\plugins
-)
-
-set RABBITMQ_EBIN_ROOT=!TDP0!..\ebin
-
-"!ERLANG_HOME!\bin\erl.exe" ^
- -pa "!RABBITMQ_EBIN_ROOT!" ^
- -noinput -hidden ^
- -s rabbit_prelaunch ^
- !RABBITMQ_NAME_TYPE! rabbitmqprelaunch!RANDOM!!TIME:~9! ^
- -extra "!RABBITMQ_NODENAME!"
-
-if ERRORLEVEL 2 (
- rem dist port mentioned in config, do not attempt to set it
-) else if ERRORLEVEL 1 (
- exit /B 1
-) else (
- set RABBITMQ_DIST_ARG=-kernel inet_dist_listen_min !RABBITMQ_DIST_PORT! -kernel inet_dist_listen_max !RABBITMQ_DIST_PORT!
-)
-
-set RABBITMQ_EBIN_PATH="-pa !RABBITMQ_EBIN_ROOT!"
-
-if "!RABBITMQ_CONFIG_FILE!"=="" (
- set RABBITMQ_CONFIG_FILE=!RABBITMQ_BASE!\rabbitmq
-)
-
-if exist "!RABBITMQ_CONFIG_FILE!.config" (
- set RABBITMQ_CONFIG_ARG=-config "!RABBITMQ_CONFIG_FILE!"
-) else (
- set RABBITMQ_CONFIG_ARG=
-)
-
-set RABBITMQ_LISTEN_ARG=
-if not "!RABBITMQ_NODE_IP_ADDRESS!"=="" (
- if not "!RABBITMQ_NODE_PORT!"=="" (
- set RABBITMQ_LISTEN_ARG=-rabbit tcp_listeners [{\""!RABBITMQ_NODE_IP_ADDRESS!"\","!RABBITMQ_NODE_PORT!"}]
- )
-)
-
-"!ERLANG_HOME!\bin\erl.exe" ^
--pa "!RABBITMQ_EBIN_ROOT!" ^
--noinput ^
--boot start_sasl ^
--s rabbit boot ^
-!RABBITMQ_CONFIG_ARG! ^
-!RABBITMQ_NAME_TYPE! !RABBITMQ_NODENAME! ^
-+W w ^
-+A30 ^
-+P 1048576 ^
--kernel inet_default_connect_options "[{nodelay, true}]" ^
-!RABBITMQ_LISTEN_ARG! ^
-!RABBITMQ_SERVER_ERL_ARGS! ^
-!RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS! ^
--sasl errlog_type error ^
--sasl sasl_error_logger false ^
--rabbit error_logger {file,\""!LOGS:\=/!"\"} ^
--rabbit sasl_error_logger {file,\""!SASL_LOGS:\=/!"\"} ^
--rabbit enabled_plugins_file \""!RABBITMQ_ENABLED_PLUGINS_FILE:\=/!"\" ^
--rabbit plugins_dir \""!RABBITMQ_PLUGINS_DIR:\=/!"\" ^
--rabbit plugins_expand_dir \""!RABBITMQ_PLUGINS_EXPAND_DIR:\=/!"\" ^
--os_mon start_cpu_sup false ^
--os_mon start_disksup false ^
--os_mon start_memsup false ^
--mnesia dir \""!RABBITMQ_MNESIA_DIR:\=/!"\" ^
-!RABBITMQ_SERVER_START_ARGS! ^
-!RABBITMQ_DIST_ARG! ^
-!STAR!
-
-endlocal
-endlocal
diff --git a/scripts/rabbitmq-service.bat b/scripts/rabbitmq-service.bat deleted file mode 100755 index c5896b59..00000000 --- a/scripts/rabbitmq-service.bat +++ /dev/null @@ -1,275 +0,0 @@ -@echo off
-REM The contents of this file are subject to the Mozilla Public License
-REM Version 1.1 (the "License"); you may not use this file except in
-REM compliance with the License. You may obtain a copy of the License
-REM at http://www.mozilla.org/MPL/
-REM
-REM Software distributed under the License is distributed on an "AS IS"
-REM basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-REM the License for the specific language governing rights and
-REM limitations under the License.
-REM
-REM The Original Code is RabbitMQ.
-REM
-REM The Initial Developer of the Original Code is GoPivotal, Inc.
-REM Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved.
-REM
-
-setlocal
-
-rem Preserve values that might contain exclamation marks before
-rem enabling delayed expansion
-set TN0=%~n0
-set TDP0=%~dp0
-set P1=%1
-setlocal enabledelayedexpansion
-
-set STARVAR=
-shift
-:loop1
-if "%1"=="" goto after_loop
- set STARVAR=%STARVAR% %1
- shift
-goto loop1
-:after_loop
-
-if "!RABBITMQ_USE_LONGNAME!"=="" (
- set RABBITMQ_NAME_TYPE="-sname"
-)
-
-if "!RABBITMQ_USE_LONGNAME!"=="true" (
- set RABBITMQ_NAME_TYPE="-name"
-)
-
-if "!RABBITMQ_SERVICENAME!"=="" (
- set RABBITMQ_SERVICENAME=RabbitMQ
-)
-
-if "!RABBITMQ_BASE!"=="" (
- set RABBITMQ_BASE=!APPDATA!\!RABBITMQ_SERVICENAME!
-)
-
-if "!COMPUTERNAME!"=="" (
- set COMPUTERNAME=localhost
-)
-
-if "!RABBITMQ_NODENAME!"=="" (
- set RABBITMQ_NODENAME=rabbit@!COMPUTERNAME!
-)
-
-if "!RABBITMQ_NODE_IP_ADDRESS!"=="" (
- if not "!RABBITMQ_NODE_PORT!"=="" (
- set RABBITMQ_NODE_IP_ADDRESS=auto
- )
-) else (
- if "!RABBITMQ_NODE_PORT!"=="" (
- set RABBITMQ_NODE_PORT=5672
- )
-)
-
-if "!RABBITMQ_DIST_PORT!"=="" (
- if "!RABBITMQ_NODE_PORT!"=="" (
- set RABBITMQ_DIST_PORT=25672
- ) else (
- set /a RABBITMQ_DIST_PORT=20000+!RABBITMQ_NODE_PORT!
- )
-)
-
-if "!ERLANG_SERVICE_MANAGER_PATH!"=="" (
- if not exist "!ERLANG_HOME!\bin\erl.exe" (
- echo.
- echo ******************************
- echo ERLANG_HOME not set correctly.
- echo ******************************
- echo.
- echo Please either set ERLANG_HOME to point to your Erlang installation or place the
- echo RabbitMQ server distribution in the Erlang lib folder.
- echo.
- exit /B
- )
- for /f "delims=" %%i in ('dir /ad/b "!ERLANG_HOME!"') do if exist "!ERLANG_HOME!\%%i\bin\erlsrv.exe" (
- set ERLANG_SERVICE_MANAGER_PATH=!ERLANG_HOME!\%%i\bin
- )
-)
-
-set CONSOLE_FLAG=
-set CONSOLE_LOG_VALID=
-for %%i in (new reuse) do if "%%i" == "!RABBITMQ_CONSOLE_LOG!" set CONSOLE_LOG_VALID=TRUE
-if "!CONSOLE_LOG_VALID!" == "TRUE" (
- set CONSOLE_FLAG=-debugtype !RABBITMQ_CONSOLE_LOG!
-)
-
-rem *** End of configuration ***
-
-if not exist "!ERLANG_SERVICE_MANAGER_PATH!\erlsrv.exe" (
- echo.
- echo **********************************************
- echo ERLANG_SERVICE_MANAGER_PATH not set correctly.
- echo **********************************************
- echo.
- echo "!ERLANG_SERVICE_MANAGER_PATH!\erlsrv.exe" not found
- echo Please set ERLANG_SERVICE_MANAGER_PATH to the folder containing "erlsrv.exe".
- echo.
- exit /B 1
-)
-
-if "!RABBITMQ_MNESIA_BASE!"=="" (
- set RABBITMQ_MNESIA_BASE=!RABBITMQ_BASE!/db
-)
-if "!RABBITMQ_LOG_BASE!"=="" (
- set RABBITMQ_LOG_BASE=!RABBITMQ_BASE!/log
-)
-
-
-rem We save the previous logs in their respective backup
-rem Log management (rotation, filtering based on size...) is left as an exercise for the user.
-
-set LOGS=!RABBITMQ_LOG_BASE!\!RABBITMQ_NODENAME!.log
-set SASL_LOGS=!RABBITMQ_LOG_BASE!\!RABBITMQ_NODENAME!-sasl.log
-
-rem End of log management
-
-
-if "!RABBITMQ_MNESIA_DIR!"=="" (
- set RABBITMQ_MNESIA_DIR=!RABBITMQ_MNESIA_BASE!/!RABBITMQ_NODENAME!-mnesia
-)
-
-if "!RABBITMQ_PLUGINS_EXPAND_DIR!"=="" (
- set RABBITMQ_PLUGINS_EXPAND_DIR=!RABBITMQ_MNESIA_BASE!/!RABBITMQ_NODENAME!-plugins-expand
-)
-
-if "!P1!" == "install" goto INSTALL_SERVICE
-for %%i in (start stop disable enable list remove) do if "%%i" == "!P1!" goto MODIFY_SERVICE
-
-echo.
-echo *********************
-echo Service control usage
-echo *********************
-echo.
-echo !TN0! help - Display this help
-echo !TN0! install - Install the !RABBITMQ_SERVICENAME! service
-echo !TN0! remove - Remove the !RABBITMQ_SERVICENAME! service
-echo.
-echo The following actions can also be accomplished by using
-echo Windows Services Management Console (services.msc):
-echo.
-echo !TN0! start - Start the !RABBITMQ_SERVICENAME! service
-echo !TN0! stop - Stop the !RABBITMQ_SERVICENAME! service
-echo !TN0! disable - Disable the !RABBITMQ_SERVICENAME! service
-echo !TN0! enable - Enable the !RABBITMQ_SERVICENAME! service
-echo.
-exit /B
-
-
-:INSTALL_SERVICE
-
-if not exist "!RABBITMQ_BASE!" (
- echo Creating base directory !RABBITMQ_BASE! & md "!RABBITMQ_BASE!"
-)
-
-"!ERLANG_SERVICE_MANAGER_PATH!\erlsrv" list !RABBITMQ_SERVICENAME! 2>NUL 1>NUL
-if errorlevel 1 (
- "!ERLANG_SERVICE_MANAGER_PATH!\erlsrv" add !RABBITMQ_SERVICENAME! -internalservicename !RABBITMQ_SERVICENAME!
-) else (
- echo !RABBITMQ_SERVICENAME! service is already present - only updating service parameters
-)
-
-if "!RABBITMQ_ENABLED_PLUGINS_FILE!"=="" (
- set RABBITMQ_ENABLED_PLUGINS_FILE=!RABBITMQ_BASE!\enabled_plugins
-)
-
-if "!RABBITMQ_PLUGINS_DIR!"=="" (
- set RABBITMQ_PLUGINS_DIR=!TDP0!..\plugins
-)
-
-set RABBITMQ_EBIN_ROOT=!TDP0!..\ebin
-
-if "!RABBITMQ_CONFIG_FILE!"=="" (
- set RABBITMQ_CONFIG_FILE=!RABBITMQ_BASE!\rabbitmq
-)
-
-"!ERLANG_HOME!\bin\erl.exe" ^
- -pa "!RABBITMQ_EBIN_ROOT!" ^
- -noinput -hidden ^
- -s rabbit_prelaunch ^
- !RABBITMQ_NAME_TYPE! rabbitmqprelaunch!RANDOM!!TIME:~9!
-
-if ERRORLEVEL 3 (
- rem ERRORLEVEL means (or greater) so we need to catch all other failure
- rem cases here
- exit /B 1
-) else if ERRORLEVEL 2 (
- rem dist port mentioned in config, do not attempt to set it
-) else if ERRORLEVEL 1 (
- exit /B 1
-) else (
- set RABBITMQ_DIST_ARG=-kernel inet_dist_listen_min !RABBITMQ_DIST_PORT! -kernel inet_dist_listen_max !RABBITMQ_DIST_PORT!
-)
-
-if exist "!RABBITMQ_CONFIG_FILE!.config" (
- set RABBITMQ_CONFIG_ARG=-config "!RABBITMQ_CONFIG_FILE!"
-) else (
- set RABBITMQ_CONFIG_ARG=
-)
-
-set RABBITMQ_LISTEN_ARG=
-if not "!RABBITMQ_NODE_IP_ADDRESS!"=="" (
- if not "!RABBITMQ_NODE_PORT!"=="" (
- set RABBITMQ_LISTEN_ARG=-rabbit tcp_listeners "[{\"!RABBITMQ_NODE_IP_ADDRESS!\", !RABBITMQ_NODE_PORT!}]"
- )
-)
-
-set ERLANG_SERVICE_ARGUMENTS= ^
--pa "!RABBITMQ_EBIN_ROOT!" ^
--boot start_sasl ^
--s rabbit boot ^
-!RABBITMQ_CONFIG_ARG! ^
-+W w ^
-+A30 ^
-+P 1048576 ^
--kernel inet_default_connect_options "[{nodelay,true}]" ^
-!RABBITMQ_LISTEN_ARG! ^
-!RABBITMQ_SERVER_ERL_ARGS! ^
--sasl errlog_type error ^
--sasl sasl_error_logger false ^
--rabbit error_logger {file,\""!LOGS:\=/!"\"} ^
--rabbit sasl_error_logger {file,\""!SASL_LOGS:\=/!"\"} ^
--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 ^
--mnesia dir \""!RABBITMQ_MNESIA_DIR:\=/!"\" ^
-!RABBITMQ_SERVER_START_ARGS! ^
-!RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS! ^
-!RABBITMQ_DIST_ARG! ^
-!STARVAR!
-
-set ERLANG_SERVICE_ARGUMENTS=!ERLANG_SERVICE_ARGUMENTS:\=\\!
-set ERLANG_SERVICE_ARGUMENTS=!ERLANG_SERVICE_ARGUMENTS:"=\"!
-
-"!ERLANG_SERVICE_MANAGER_PATH!\erlsrv" set !RABBITMQ_SERVICENAME! ^
--machine "!ERLANG_SERVICE_MANAGER_PATH!\erl.exe" ^
--env ERL_CRASH_DUMP="!RABBITMQ_BASE:\=/!/erl_crash.dump" ^
--workdir "!RABBITMQ_BASE!" ^
--stopaction "rabbit:stop_and_halt()." ^
-!RABBITMQ_NAME_TYPE! !RABBITMQ_NODENAME! ^
-!CONSOLE_FLAG! ^
--comment "A robust and scalable messaging broker" ^
--args "!ERLANG_SERVICE_ARGUMENTS!" > NUL
-
-goto END
-
-
-:MODIFY_SERVICE
-
-"!ERLANG_SERVICE_MANAGER_PATH!\erlsrv" !P1! !RABBITMQ_SERVICENAME!
-goto END
-
-
-:END
-
-endlocal
-endlocal
diff --git a/scripts/rabbitmqctl b/scripts/rabbitmqctl deleted file mode 100755 index d437e251..00000000 --- a/scripts/rabbitmqctl +++ /dev/null @@ -1,41 +0,0 @@ -#!/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 -## 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-2014 GoPivotal, Inc. All rights reserved. -## - -# Get default settings with user overrides for (RABBITMQ_)<var_name> -# Non-empty defaults should be set in rabbitmq-env -. `dirname $0`/rabbitmq-env - -# rabbitmqctl starts distribution itself, so we need to make sure epmd -# is running. -${ERL_DIR}erl ${RABBITMQ_NAME_TYPE} rabbitmqctl-prelaunch-$$ -noinput \ --eval 'erlang:halt().' -boot "${CLEAN_BOOT_FILE}" - -# We specify Mnesia dir and sasl error logger since some actions -# (e.g. forget_cluster_node --offline) require us to impersonate the -# real node. -RABBITMQ_USE_LONGNAME=${RABBITMQ_USE_LONGNAME} \ -exec ${ERL_DIR}erl \ - -pa "${RABBITMQ_HOME}/ebin" \ - -noinput \ - -hidden \ - ${RABBITMQ_CTL_ERL_ARGS} \ - -boot "${CLEAN_BOOT_FILE}" \ - -sasl errlog_type error \ - -mnesia dir "\"${RABBITMQ_MNESIA_DIR}\"" \ - -s rabbit_control_main \ - -nodename $RABBITMQ_NODENAME \ - -extra "$@" diff --git a/scripts/rabbitmqctl.bat b/scripts/rabbitmqctl.bat deleted file mode 100755 index 6eb2530a..00000000 --- a/scripts/rabbitmqctl.bat +++ /dev/null @@ -1,82 +0,0 @@ -@echo off
-REM The contents of this file are subject to the Mozilla Public License
-REM Version 1.1 (the "License"); you may not use this file except in
-REM compliance with the License. You may obtain a copy of the License
-REM at http://www.mozilla.org/MPL/
-REM
-REM Software distributed under the License is distributed on an "AS IS"
-REM basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-REM the License for the specific language governing rights and
-REM limitations under the License.
-REM
-REM The Original Code is RabbitMQ.
-REM
-REM The Initial Developer of the Original Code is GoPivotal, Inc.
-REM Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved.
-REM
-
-setlocal
-
-rem Preserve values that might contain exclamation marks before
-rem enabling delayed expansion
-set TDP0=%~dp0
-set STAR=%*
-setlocal enabledelayedexpansion
-
-if "!RABBITMQ_BASE!"=="" (
- set RABBITMQ_BASE=!APPDATA!\RabbitMQ
-)
-
-if "!RABBITMQ_USE_LONGNAME!"=="" (
- set RABBITMQ_NAME_TYPE="-sname"
-)
-
-if "!RABBITMQ_USE_LONGNAME!"=="true" (
- set RABBITMQ_NAME_TYPE="-name"
-)
-
-if "!COMPUTERNAME!"=="" (
- set COMPUTERNAME=localhost
-)
-
-if "!RABBITMQ_NODENAME!"=="" (
- set RABBITMQ_NODENAME=rabbit@!COMPUTERNAME!
-)
-
-if "!RABBITMQ_MNESIA_BASE!"=="" (
- set RABBITMQ_MNESIA_BASE=!RABBITMQ_BASE!/db
-)
-
-if "!RABBITMQ_MNESIA_DIR!"=="" (
- set RABBITMQ_MNESIA_DIR=!RABBITMQ_MNESIA_BASE!/!RABBITMQ_NODENAME!-mnesia
-)
-
-if not exist "!ERLANG_HOME!\bin\erl.exe" (
- echo.
- echo ******************************
- echo ERLANG_HOME not set correctly.
- echo ******************************
- echo.
- echo Please either set ERLANG_HOME to point to your Erlang installation or place the
- echo RabbitMQ server distribution in the Erlang lib folder.
- echo.
- exit /B
-)
-
-rem rabbitmqctl starts distribution itself, so we need to make sure epmd
-rem is running.
-"!ERLANG_HOME!\bin\erl.exe" !RABBITMQ_NAME_TYPE! rabbitmqctl-prelaunch-!RANDOM!!TIME:~9! -noinput -eval "erlang:halt()."
-
-"!ERLANG_HOME!\bin\erl.exe" ^
--pa "!TDP0!..\ebin" ^
--noinput ^
--hidden ^
-!RABBITMQ_CTL_ERL_ARGS! ^
--sasl errlog_type error ^
--mnesia dir \""!RABBITMQ_MNESIA_DIR:\=/!"\" ^
--s rabbit_control_main ^
--nodename !RABBITMQ_NODENAME! ^
--extra !STAR!
-
-endlocal
-endlocal
|