diff options
Diffstat (limited to 'packaging')
-rw-r--r-- | packaging/generic-unix/Makefile | 4 | ||||
-rw-r--r-- | packaging/generic-unix/rabbitmq-sys-defaults (renamed from packaging/generic-unix/rabbitmq-locations) | 20 | ||||
-rw-r--r-- | packaging/macports/Portfile.in | 4 |
3 files changed, 17 insertions, 11 deletions
diff --git a/packaging/generic-unix/Makefile b/packaging/generic-unix/Makefile index 5989d5c0..50298219 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-locations $(TARGET_DIR)/sbin - chmod 0755 $(TARGET_DIR)/sbin/rabbitmq-locations + cp -f rabbitmq-sys-defaults $(TARGET_DIR)/sbin + chmod 0755 $(TARGET_DIR)/sbin/rabbitmq-sys-defaults mkdir -p $(TARGET_DIR)/etc/rabbitmq diff --git a/packaging/generic-unix/rabbitmq-locations b/packaging/generic-unix/rabbitmq-sys-defaults index 8812f8d2..279c6495 100644 --- a/packaging/generic-unix/rabbitmq-locations +++ b/packaging/generic-unix/rabbitmq-sys-defaults @@ -19,16 +19,22 @@ ### 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}]" -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 - -OLD_CONF_ENV_FILE=/etc/rabbitmq/rabbitmq.conf -CONF_ENV_FILE=${SYS_PREFIX}/etc/rabbitmq/rabbitmq-env.conf +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 cae0ebf3..59e7f38c 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-locations + ${realsbin}/rabbitmq-sys-defaults reinplace -E "s:^SYS_PREFIX=$:SYS_PREFIX=${prefix}:" \ - ${realsbin}/rabbitmq-locations + ${realsbin}/rabbitmq-sys-defaults xinstall -m 555 ${filespath}/rabbitmq-script-wrapper \ ${wrappersbin}/rabbitmq-server |