blob: 279c6495067d6b7f14038c1d156d430315ca95ef (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
#!/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"
|