diff options
author | Emile Joubert <emile@rabbitmq.com> | 2010-11-19 14:55:20 +0000 |
---|---|---|
committer | Emile Joubert <emile@rabbitmq.com> | 2010-11-19 14:55:20 +0000 |
commit | eb54f2af108b52cd96fe506ecafb9fbfbfe2d8a3 (patch) | |
tree | 5ff6e95176adffb96b9a51df9b3216ce57894342 /scripts | |
parent | 5f7e24198de005dd24ef20f73299a6848c15dcde (diff) | |
download | rabbitmq-server-eb54f2af108b52cd96fe506ecafb9fbfbfe2d8a3.tar.gz |
Make scripts work on Solaris
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/rabbitmq-multi | 10 | ||||
-rwxr-xr-x | scripts/rabbitmq-server | 11 | ||||
-rwxr-xr-x | scripts/rabbitmqctl | 10 |
3 files changed, 25 insertions, 6 deletions
diff --git a/scripts/rabbitmq-multi b/scripts/rabbitmq-multi index 59050692..6674f6c5 100755 --- a/scripts/rabbitmq-multi +++ b/scripts/rabbitmq-multi @@ -29,8 +29,14 @@ ## ## Contributor(s): ______________________________________. ## -[ "x" = "x$HOSTNAME" ] && HOSTNAME=`env hostname -s` -NODENAME=rabbit@${HOSTNAME%%.*} +if [ "SunOS" = `uname -s` ] +then + [ "x" = "x$HOSTNAME" ] && HOSTNAME=`env hostname` + NODENAME=rabbit@`echo $HOSTNAME | sed 's/\\..*//'` +else + [ "x" = "x$HOSTNAME" ] && HOSTNAME=`env hostname -s` + NODENAME=rabbit@${HOSTNAME%%.*} +fi SCRIPT_HOME=$(dirname $0) PIDS_FILE=/var/lib/rabbitmq/pids MULTI_ERL_ARGS= diff --git a/scripts/rabbitmq-server b/scripts/rabbitmq-server index 0eb7092d..db8f093f 100755 --- a/scripts/rabbitmq-server +++ b/scripts/rabbitmq-server @@ -30,8 +30,15 @@ ## Contributor(s): ______________________________________. ## -[ "x" = "x$HOSTNAME" ] && HOSTNAME=`env hostname -s` -NODENAME=rabbit@${HOSTNAME%%.*} +if [ "SunOS" = `uname -s` ] +then + [ "x" = "x$HOSTNAME" ] && HOSTNAME=`env hostname` + NODENAME=rabbit@`echo $HOSTNAME | sed 's/\\..*//'` +else + [ "x" = "x$HOSTNAME" ] && HOSTNAME=`env hostname -s` + NODENAME=rabbit@${HOSTNAME%%.*} +fi + SERVER_ERL_ARGS="+K true +A30 +P 1048576 \ -kernel inet_default_listen_options [{nodelay,true}] \ -kernel inet_default_connect_options [{nodelay,true}]" diff --git a/scripts/rabbitmqctl b/scripts/rabbitmqctl index 76ce25fd..e024129d 100755 --- a/scripts/rabbitmqctl +++ b/scripts/rabbitmqctl @@ -30,8 +30,14 @@ ## Contributor(s): ______________________________________. ## -[ "x" = "x$HOSTNAME" ] && HOSTNAME=`env hostname -s` -NODENAME=rabbit@${HOSTNAME%%.*} +if [ "SunOS" = `uname -s` ] +then + [ "x" = "x$HOSTNAME" ] && HOSTNAME=`env hostname` + NODENAME=rabbit@`echo $HOSTNAME | sed 's/\\..*//'` +else + [ "x" = "x$HOSTNAME" ] && HOSTNAME=`env hostname -s` + NODENAME=rabbit@${HOSTNAME%%.*} +fi . `dirname $0`/rabbitmq-env |