svn commit: r343104 - in head/net/rabbitmq: . files
Jimmy Olgeni
olgeni at FreeBSD.org
Thu Feb 6 15:00:26 UTC 2014
Author: olgeni
Date: Thu Feb 6 15:00:25 2014
New Revision: 343104
URL: http://svnweb.freebsd.org/changeset/ports/343104
QAT: https://qat.redports.org/buildarchive/r343104/
Log:
Add a separate "wait" command to the startup script, to be used
with automated deployment systems to ensure that RabbitMQ is actually
available.
The pid file may exist, but it can still be empty when $rabbitmq_ctl
is executed. In this case the script would not wait for anything
and produce some weird output on the console.
PR: ports/185962 (follow up)
Modified:
head/net/rabbitmq/Makefile
head/net/rabbitmq/files/rabbitmq.in
Modified: head/net/rabbitmq/Makefile
==============================================================================
--- head/net/rabbitmq/Makefile Thu Feb 6 14:51:34 2014 (r343103)
+++ head/net/rabbitmq/Makefile Thu Feb 6 15:00:25 2014 (r343104)
@@ -3,6 +3,7 @@
PORTNAME= rabbitmq
PORTVERSION= 3.2.3
+PORTREVISION= 1
CATEGORIES= net
MASTER_SITES= http://www.rabbitmq.com/releases/rabbitmq-server/v${PORTVERSION}/
DISTNAME= ${PORTNAME}-server-${PORTVERSION}
Modified: head/net/rabbitmq/files/rabbitmq.in
==============================================================================
--- head/net/rabbitmq/files/rabbitmq.in Thu Feb 6 14:51:34 2014 (r343103)
+++ head/net/rabbitmq/files/rabbitmq.in Thu Feb 6 15:00:25 2014 (r343104)
@@ -31,7 +31,8 @@ stop_cmd="env HOME=/var/db/rabbitmq su -
stop_postcmd="wait_for_pids $rc_pid"
rotate_logs_cmd="env HOME=/var/db/rabbitmq su -m ${rabbitmq_user} -c 'sh -c \"${rabbitmq_ctl} rotate_logs\"'"
status_cmd="env HOME=/var/db/rabbitmq su -m ${rabbitmq_user} -c 'sh -c \"${rabbitmq_ctl} status\"'"
-extra_commands="rotate_logs status"
+extra_commands="rotate_logs status wait"
+wait_cmd=rabbitmq_wait
rabbitmq_start()
{
@@ -44,7 +45,10 @@ 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_wait()
+{
$rabbitmq_ctl wait ${pidfile}
}
More information about the svn-ports-all
mailing list