aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorolgeni <olgeni@FreeBSD.org>2014-01-21 23:40:07 +0800
committerolgeni <olgeni@FreeBSD.org>2014-01-21 23:40:07 +0800
commitef5f30c56ce7e92ce8059e0c3791b318a7bd0b45 (patch)
treee14e197fbcc01737ab19d0b3395c23534d29ff4c
parent425f808b1c1cf2e199eb6757b655e1d26d08bce6 (diff)
downloadfreebsd-ports-gnome-ef5f30c56ce7e92ce8059e0c3791b318a7bd0b45.tar.gz
freebsd-ports-gnome-ef5f30c56ce7e92ce8059e0c3791b318a7bd0b45.tar.zst
freebsd-ports-gnome-ef5f30c56ce7e92ce8059e0c3791b318a7bd0b45.zip
- Export HOME before starting RabbitMQ node.
- After starting, wait for RabbitMQ to be available. PR: ports/185962 Submitted by: Anes Mukhametov <anes@anes.su>
-rw-r--r--net/rabbitmq/Makefile2
-rw-r--r--net/rabbitmq/files/rabbitmq.in4
2 files changed, 4 insertions, 2 deletions
diff --git a/net/rabbitmq/Makefile b/net/rabbitmq/Makefile
index da86321c1107..8d35f2df3814 100644
--- a/net/rabbitmq/Makefile
+++ b/net/rabbitmq/Makefile
@@ -3,7 +3,7 @@
PORTNAME= rabbitmq
PORTVERSION= 3.2.2
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= net
MASTER_SITES= http://www.rabbitmq.com/releases/rabbitmq-server/v${PORTVERSION}/
DISTNAME= ${PORTNAME}-server-${PORTVERSION}
diff --git a/net/rabbitmq/files/rabbitmq.in b/net/rabbitmq/files/rabbitmq.in
index 04f17b8215dd..32eee117f3d7 100644
--- a/net/rabbitmq/files/rabbitmq.in
+++ b/net/rabbitmq/files/rabbitmq.in
@@ -35,7 +35,7 @@ extra_commands="rotate_logs status"
rabbitmq_start()
{
- HOME=/var/db/rabbitmq
+ export HOME=/var/db/rabbitmq
unset ERL_LIBS
su -m ${rabbitmq_user} \
-c "sh -c \"${rabbitmq_server} -detached\""
@@ -44,6 +44,8 @@ rabbitmq_start()
su -m ${rabbitmq_user} \
-c "sh -c \"${rabbitmq_ctl} status\"" \
| sed -n 's/[^p]*pid,\([0-9]*\)[^0-9]*/\1/p' > ${pidfile}
+# Wait until rabbitmq is up and fully functional
+ $rabbitmq_ctl wait ${pidfile}
}
run_rc_command "$1"