From a5693ce05e62e7e9898651ed033c55b27adbbf63 Mon Sep 17 00:00:00 2001 From: Steve Powell Date: Tue, 28 Feb 2012 10:56:15 +0000 Subject: Move SERVER_ERL_ARGS to rabbitmq-env and renamed rabbitmq-sys-defaults to rabbitmq-defaults --- Makefile | 2 +- packaging/generic-unix/Makefile | 4 +-- packaging/generic-unix/rabbitmq-defaults | 38 ++++++++++++++++++++++++++ packaging/generic-unix/rabbitmq-sys-defaults | 40 ---------------------------- packaging/macports/Portfile.in | 4 +-- scripts/rabbitmq-defaults | 30 +++++++++++++++++++++ scripts/rabbitmq-env | 8 ++++-- scripts/rabbitmq-sys-defaults | 32 ---------------------- 8 files changed, 79 insertions(+), 79 deletions(-) create mode 100644 packaging/generic-unix/rabbitmq-defaults delete mode 100644 packaging/generic-unix/rabbitmq-sys-defaults create mode 100644 scripts/rabbitmq-defaults delete mode 100644 scripts/rabbitmq-sys-defaults diff --git a/Makefile b/Makefile index 3144889b..e8975856 100644 --- a/Makefile +++ b/Makefile @@ -316,7 +316,7 @@ install_bin: all install_dirs cp -r ebin include LICENSE* INSTALL $(TARGET_DIR) chmod 0755 scripts/* - for script in rabbitmq-env rabbitmq-server rabbitmqctl rabbitmq-plugins rabbitmq-sys-defaults; do \ + for script in rabbitmq-env rabbitmq-server rabbitmqctl rabbitmq-plugins rabbitmq-defaults; do \ cp scripts/$$script $(TARGET_DIR)/sbin; \ [ -e $(SBIN_DIR)/$$script ] || ln -s $(SCRIPTS_REL_PATH)/$$script $(SBIN_DIR)/$$script; \ done diff --git a/packaging/generic-unix/Makefile b/packaging/generic-unix/Makefile index 50298219..d485bf6b 100644 --- a/packaging/generic-unix/Makefile +++ b/packaging/generic-unix/Makefile @@ -12,8 +12,8 @@ dist: MAN_DIR=`pwd`/$(TARGET_DIR)/share/man \ install - cp -f rabbitmq-sys-defaults $(TARGET_DIR)/sbin - chmod 0755 $(TARGET_DIR)/sbin/rabbitmq-sys-defaults + cp -f rabbitmq-defaults $(TARGET_DIR)/sbin + chmod 0755 $(TARGET_DIR)/sbin/rabbitmq-defaults mkdir -p $(TARGET_DIR)/etc/rabbitmq diff --git a/packaging/generic-unix/rabbitmq-defaults b/packaging/generic-unix/rabbitmq-defaults new file mode 100644 index 00000000..ec1dd621 --- /dev/null +++ b/packaging/generic-unix/rabbitmq-defaults @@ -0,0 +1,38 @@ +#!/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 VMware, Inc. +## Copyright (c) 2012 VMware, Inc. All rights reserved. +## + +### generic-unix ### +### next line potentially updated in package install steps +SYS_PREFIX=${RABBITMQ_HOME} + +check_and_set_rabbitmq_file_location() { + # $1 - var name (set), $2 - global location, $3 - optional suffix for check + [ -f $2$3 ] && [ ! -f ${SYS_PREFIX}$2$3 ] && \ + echo "WARNING: $1 default is ${SYS_PREFIX}$2, ignoring $2" + eval "$1=${SYS_PREFIX}$2" +} + +## Set default values + +check_and_set_rabbitmq_file_location CONF_ENV_FILE /etc/rabbitmq/rabbitmq-env.conf +check_and_set_rabbitmq_file_location CONFIG_FILE /etc/rabbitmq/rabbitmq .config +check_and_set_rabbitmq_file_location ENABLED_PLUGINS_FILE /etc/rabbitmq/enabled-plugins +check_and_set_rabbitmq_file_location LOG_BASE /var/log/rabbitmq +check_and_set_rabbitmq_file_location MNESIA_BASE /var/lib/rabbitmq/mnesia + +PLUGINS_DIR="${RABBITMQ_HOME}/plugins" + diff --git a/packaging/generic-unix/rabbitmq-sys-defaults b/packaging/generic-unix/rabbitmq-sys-defaults deleted file mode 100644 index 279c6495..00000000 --- a/packaging/generic-unix/rabbitmq-sys-defaults +++ /dev/null @@ -1,40 +0,0 @@ -#!/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 VMware, Inc. -## Copyright (c) 2012 VMware, Inc. All rights reserved. -## - -### generic-unix ### -### next line potentially updated in package install steps -SYS_PREFIX=${RABBITMQ_HOME} - -check_and_set_rabbitmq_file_location() { - # $1 - var name (set), $2 - global location, $3 - optional suffix for check - [ -f $2$3 ] && [ ! -f ${SYS_PREFIX}$2$3 ] && \ - echo "WARNING: $1 default is ${SYS_PREFIX}$2, ignoring $2" - eval "$1=${SYS_PREFIX}$2" -} - -## Set system default values -SERVER_ERL_ARGS="+K true +A30 +P 1048576 \ --kernel inet_default_connect_options [{nodelay,true}]" - -check_and_set_rabbitmq_file_location CONF_ENV_FILE /etc/rabbitmq/rabbitmq-env.conf -check_and_set_rabbitmq_file_location CONFIG_FILE /etc/rabbitmq/rabbitmq .config -check_and_set_rabbitmq_file_location ENABLED_PLUGINS_FILE /etc/rabbitmq/enabled-plugins -check_and_set_rabbitmq_file_location LOG_BASE /var/log/rabbitmq -check_and_set_rabbitmq_file_location MNESIA_BASE /var/lib/rabbitmq/mnesia - -PLUGINS_DIR="${RABBITMQ_HOME}/plugins" - diff --git a/packaging/macports/Portfile.in b/packaging/macports/Portfile.in index 59e7f38c..e461e49e 100644 --- a/packaging/macports/Portfile.in +++ b/packaging/macports/Portfile.in @@ -91,9 +91,9 @@ post-destroot { xinstall -d -g [existsgroup ${servergroup}] -m 775 ${destroot}${mnesiadbdir} reinplace -E "s:^SYS_PREFIX=\${RABBITMQ_HOME}$:SYS_PREFIX=${prefix}:" \ - ${realsbin}/rabbitmq-sys-defaults + ${realsbin}/rabbitmq-defaults reinplace -E "s:^SYS_PREFIX=$:SYS_PREFIX=${prefix}:" \ - ${realsbin}/rabbitmq-sys-defaults + ${realsbin}/rabbitmq-defaults xinstall -m 555 ${filespath}/rabbitmq-script-wrapper \ ${wrappersbin}/rabbitmq-server diff --git a/scripts/rabbitmq-defaults b/scripts/rabbitmq-defaults new file mode 100644 index 00000000..3930e262 --- /dev/null +++ b/scripts/rabbitmq-defaults @@ -0,0 +1,30 @@ +#!/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 VMware, Inc. +## Copyright (c) 2012 VMware, Inc. All rights reserved. +## + +### next line potentially updated in package install steps, do not alter +SYS_PREFIX= + +## 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-env b/scripts/rabbitmq-env index 80e34e81..19767138 100755 --- a/scripts/rabbitmq-env +++ b/scripts/rabbitmq-env @@ -36,8 +36,12 @@ RABBITMQ_HOME="${SCRIPT_DIR}/.." [ "x" = "x$HOSTNAME" ] && HOSTNAME=`env hostname` NODENAME=rabbit@${HOSTNAME%%.*} -## Get system defaults -. ${SCRIPT_DIR}/rabbitmq-sys-defaults +## 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 ] && \ diff --git a/scripts/rabbitmq-sys-defaults b/scripts/rabbitmq-sys-defaults deleted file mode 100644 index a425f923..00000000 --- a/scripts/rabbitmq-sys-defaults +++ /dev/null @@ -1,32 +0,0 @@ -#!/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 VMware, Inc. -## Copyright (c) 2012 VMware, Inc. All rights reserved. -## - -### next line potentially updated in package install steps, do not alter -SYS_PREFIX= - -## Set system default values -SERVER_ERL_ARGS="+K true +A30 +P 1048576 \ --kernel inet_default_connect_options [{nodelay,true}]" - -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 -- cgit v1.2.1