diff options
author | Wesley Shields <wxs@FreeBSD.org> | 2008-10-29 01:01:34 +0000 |
---|---|---|
committer | Wesley Shields <wxs@FreeBSD.org> | 2008-10-29 01:01:34 +0000 |
commit | 286741f08ddf54a8762422df7e3636a0857c7f90 (patch) | |
tree | bbb644cd3cafed9d7ca81a962b4817aff6d1ed06 /net/rabbitmq | |
parent | - Update to 1.1.0 (diff) |
- Add UID and GID entries for net/rabbitmq.
- Convince RC script to use rabbitmq user.
PR: ports/128108
Submitted by: Nick Barkas <snb@threerings.net>
Approved by: Phillip N. <pneumann@gmail.com> (maintainer)
Notes
Notes:
svn path=/head/; revision=222183
Diffstat (limited to 'net/rabbitmq')
-rw-r--r-- | net/rabbitmq/Makefile | 12 | ||||
-rw-r--r-- | net/rabbitmq/files/rabbitmq.in | 23 |
2 files changed, 15 insertions, 20 deletions
diff --git a/net/rabbitmq/Makefile b/net/rabbitmq/Makefile index e2ea0f1253d7..7546745df12c 100644 --- a/net/rabbitmq/Makefile +++ b/net/rabbitmq/Makefile @@ -7,7 +7,7 @@ PORTNAME= rabbitmq PORTVERSION= 1.4.0 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= net MASTER_SITES= http://www.rabbitmq.com/releases/rabbitmq-server/v${PORTVERSION}/ DISTNAME= ${PORTNAME}-server-${PORTVERSION} @@ -24,6 +24,9 @@ MAKE_ENV+= TARGET_DIR="${PREFIX}/lib/erlang/lib/rabbitmq_server-${PORTVERSION}" SCRIPTS_DIR= ${WRKSRC}/scripts/ USE_RC_SUBR= rabbitmq PLIST_SUB= "VERSION=${PORTVERSION}" +SUB_FILES= pkg-install +RABBITMQ_USER= rabbitmq +RABBITMQ_GROUP= ${RABBITMQ_USER} post-patch: @${REINPLACE_CMD} -e 's|/etc/default|${PREFIX}/etc/rabbitmq|g ; s|/var/lib|/var/db|g ; s|erl|${PREFIX}/bin/erl|g' \ @@ -31,7 +34,10 @@ post-patch: @${FIND} ${WRKSRC} -name "*.bak" | ${XARGS} ${RM} -post-install: - @${MKDIR} /var/log/rabbitmq /var/db/rabbitmq/mnesia ${PREFIX}/etc/rabbitmq +pre-install: + @${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL +post-install: + @${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL + .include <bsd.port.mk> diff --git a/net/rabbitmq/files/rabbitmq.in b/net/rabbitmq/files/rabbitmq.in index 0b26934aebb3..1b8feab393e4 100644 --- a/net/rabbitmq/files/rabbitmq.in +++ b/net/rabbitmq/files/rabbitmq.in @@ -14,28 +14,17 @@ . "%%RC_SUBR%%" +name=rabbitmq +rcvar=`set_rcvar` + # Set some defaults rabbitmq_enable=${rabbitmq_enable:-"NO"} +rabbitmq_user=${rabbitmq_user:-"rabbitmq"} prefix=%%PREFIX%% -name=rabbitmq -start_cmd="${name}_start" -stop_cmd="${name}_stop" - -rabbitmq_start() -{ - ${prefix}/sbin/rabbitmq-server -detached - echo "RabbitMQ started" -} +start_cmd="env HOME=/var/db/rabbitmq su -m ${rabbitmq_user} -c 'sh -c \"${prefix}/sbin/rabbitmq-server -detached\"'" +stop_cmd="env HOME=/var/db/rabbitmq su -m ${rabbitmq_user} -c 'sh -c \"${prefix}/sbin/rabbitmqctl stop\"'" -rabbitmq_stop() -{ - ${prefix}/sbin/rabbitmqctl stop -} - -rcvar=`set_rcvar` load_rc_config $name - - run_rc_command "$1" |